Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
docs: added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Taliesin Millhouse committed Aug 11, 2021
1 parent 694f379 commit efa2bf7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ import (
)

var (
// CognitoClient is the client that interacts with Cognito.
CognitoClient *cognitoidentityprovider.Client
// CognitoUserPoolID is the id of the user pool in Cognito.
CognitoUserPoolID string
// CognitoUserPoolClientID is the id of the user pool client in Cognito.
CognitoUserPoolClientID string
)

// Initialize will initialize the auth package. Both profile and region parameters are option if authentication can be
// achieved via another method. For example, environment variables or IAM roles.
func Initialize(ctx context.Context, profile string, region string, cognitoUserPoolID string, cognitoClientID string) error {
var cfg aws.Config
var err error
Expand Down
1 change: 1 addition & 0 deletions sign_in.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/gofor-little/xerror"
)

// SignIn will attempt to sign a user in, returning the result.
func SignIn(ctx context.Context, emailAddress string, password string) (*types.AuthenticationResultType, error) {
if err := checkPackage(); err != nil {
return nil, xerror.Wrap("checkPackage call failed", err)
Expand Down

0 comments on commit efa2bf7

Please sign in to comment.