mock

package
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMockIDToken added in v1.7.0

func GenerateMockIDToken(email string) string

Types

type CognitoIdentityProviderClientStub added in v1.5.0

type CognitoIdentityProviderClientStub struct {
	cognitoidentityprovideriface.CognitoIdentityProviderAPI
	UserPools []string
	Users     []*User
	Sessions  []Session
	Groups    []*Group
}

func (*CognitoIdentityProviderClientStub) AddGroupWithName added in v1.13.0

func (m *CognitoIdentityProviderClientStub) AddGroupWithName(name string) error

func (*CognitoIdentityProviderClientStub) AddGroupWithNameAndDescription added in v1.13.0

func (m *CognitoIdentityProviderClientStub) AddGroupWithNameAndDescription(name, description string) error

func (*CognitoIdentityProviderClientStub) AddGroupWithNameAndPrecedence added in v1.13.0

func (m *CognitoIdentityProviderClientStub) AddGroupWithNameAndPrecedence(name string, precedence int64) error

func (*CognitoIdentityProviderClientStub) AddUserToGroup added in v1.16.0

func (m *CognitoIdentityProviderClientStub) AddUserToGroup(username string, groupName string) error

func (*CognitoIdentityProviderClientStub) AddUserWithEmail added in v1.12.0

func (m *CognitoIdentityProviderClientStub) AddUserWithEmail(email, password string, isConfirmed bool)

func (*CognitoIdentityProviderClientStub) AddUserWithUsername added in v1.6.0

func (m *CognitoIdentityProviderClientStub) AddUserWithUsername(username, email string, isConfirmed bool)

func (*CognitoIdentityProviderClientStub) AdminAddUserToGroup added in v1.15.0

func (*CognitoIdentityProviderClientStub) AdminCreateUser added in v1.7.0

func (*CognitoIdentityProviderClientStub) AdminDisableUser added in v1.15.0

func (*CognitoIdentityProviderClientStub) AdminEnableUser added in v1.15.0

func (*CognitoIdentityProviderClientStub) AdminGetUser added in v1.12.0

func (*CognitoIdentityProviderClientStub) AdminRemoveUserFromGroup added in v1.16.0

func (*CognitoIdentityProviderClientStub) AdminUpdateUserAttributes added in v1.13.0

func (*CognitoIdentityProviderClientStub) AdminUserGlobalSignOut added in v1.7.0

func (*CognitoIdentityProviderClientStub) ConfirmForgotPassword added in v1.14.0

func (*CognitoIdentityProviderClientStub) CreateGroup added in v1.13.0

func (*CognitoIdentityProviderClientStub) CreateIdTokenForEmail added in v1.7.0

func (m *CognitoIdentityProviderClientStub) CreateIdTokenForEmail(email string) string

func (*CognitoIdentityProviderClientStub) CreateSessionWithAccessToken added in v1.5.0

func (m *CognitoIdentityProviderClientStub) CreateSessionWithAccessToken(accessToken string)

func (*CognitoIdentityProviderClientStub) DescribeUserPool added in v1.5.0

func (*CognitoIdentityProviderClientStub) ForgotPassword added in v1.11.0

func (*CognitoIdentityProviderClientStub) GenerateGroup added in v1.13.0

func (m *CognitoIdentityProviderClientStub) GenerateGroup(name, description string, precedence int64) (*Group, error)

func (*CognitoIdentityProviderClientStub) GenerateSession added in v1.5.0

func (m *CognitoIdentityProviderClientStub) GenerateSession(accessToken string, idToken string, refreshToken string) Session

func (*CognitoIdentityProviderClientStub) GenerateUser added in v1.6.0

func (m *CognitoIdentityProviderClientStub) GenerateUser(id, email, password, givenName, familyName string, isConfirmed bool) *User

func (*CognitoIdentityProviderClientStub) GetGroup added in v1.15.0

func (*CognitoIdentityProviderClientStub) GlobalSignOut added in v1.5.0

func (*CognitoIdentityProviderClientStub) InitiateAuth added in v1.6.0

func (*CognitoIdentityProviderClientStub) ListUsers added in v1.7.0

func (*CognitoIdentityProviderClientStub) ListUsersInGroup added in v1.15.0

func (*CognitoIdentityProviderClientStub) ReadGroup added in v1.15.0

func (m *CognitoIdentityProviderClientStub) ReadGroup(groupName string) *Group

func (*CognitoIdentityProviderClientStub) ReadUser added in v1.15.0

func (m *CognitoIdentityProviderClientStub) ReadUser(username string) *User

func (*CognitoIdentityProviderClientStub) RespondToAuthChallenge added in v1.10.0

func (*CognitoIdentityProviderClientStub) SetUserActiveState added in v1.15.0

func (m *CognitoIdentityProviderClientStub) SetUserActiveState(username, active string)

type Group added in v1.13.0

type Group struct {
	Name        string
	Description string
	Precedence  int64
	Created     time.Time
	Members     []*User
}

type MockCognitoIdentityProviderClient

type MockCognitoIdentityProviderClient struct {
	cognitoidentityprovideriface.CognitoIdentityProviderAPI
	DescribeUserPoolFunc          func(poolInputData *cognitoidentityprovider.DescribeUserPoolInput) (*cognitoidentityprovider.DescribeUserPoolOutput, error)
	AdminCreateUserFunc           func(userInput *cognitoidentityprovider.AdminCreateUserInput) (*cognitoidentityprovider.AdminCreateUserOutput, error)
	GlobalSignOutFunc             func(signOutInput *cognitoidentityprovider.GlobalSignOutInput) (*cognitoidentityprovider.GlobalSignOutOutput, error)
	ListUsersFunc                 func(usersInput *cognitoidentityprovider.ListUsersInput) (*cognitoidentityprovider.ListUsersOutput, error)
	InitiateAuthFunc              func(authInput *cognitoidentityprovider.InitiateAuthInput) (*cognitoidentityprovider.InitiateAuthOutput, error)
	AdminUserGlobalSignOutFunc    func(adminUserGlobalSignOutInput *cognitoidentityprovider.AdminUserGlobalSignOutInput) (*cognitoidentityprovider.AdminUserGlobalSignOutOutput, error)
	RespondToAuthChallengeFunc    func(input *cognitoidentityprovider.RespondToAuthChallengeInput) (*cognitoidentityprovider.RespondToAuthChallengeOutput, error)
	ConfirmForgotPasswordFunc     func(input *cognitoidentityprovider.ConfirmForgotPasswordInput) (*cognitoidentityprovider.ConfirmForgotPasswordOutput, error)
	ForgotPasswordFunc            func(input *cognitoidentityprovider.ForgotPasswordInput) (*cognitoidentityprovider.ForgotPasswordOutput, error)
	AdminGetUserFunc              func(input *cognitoidentityprovider.AdminGetUserInput) (*cognitoidentityprovider.AdminGetUserOutput, error)
	CreateGroupFunc               func(input *cognitoidentityprovider.CreateGroupInput) (*cognitoidentityprovider.CreateGroupOutput, error)
	GetGroupFunc                  func(input *cognitoidentityprovider.GetGroupInput) (*cognitoidentityprovider.GetGroupOutput, error)
	AdminUpdateUserAttributesFunc func(input *cognitoidentityprovider.AdminUpdateUserAttributesInput) (*cognitoidentityprovider.AdminUpdateUserAttributesOutput, error)
	AdminEnableUserFunc           func(input *cognitoidentityprovider.AdminEnableUserInput) (*cognitoidentityprovider.AdminEnableUserOutput, error)
	AdminDisableUserFunc          func(input *cognitoidentityprovider.AdminDisableUserInput) (*cognitoidentityprovider.AdminDisableUserOutput, error)
	AdminAddUserToGroupFunc       func(input *cognitoidentityprovider.AdminAddUserToGroupInput) (*cognitoidentityprovider.AdminAddUserToGroupOutput, error)
	ListUsersInGroupFunc          func(input *cognitoidentityprovider.ListUsersInGroupInput) (*cognitoidentityprovider.ListUsersInGroupOutput, error)
	AdminRemoveUserFromGroupFunc  func(input *cognitoidentityprovider.AdminRemoveUserFromGroupInput) (*cognitoidentityprovider.AdminRemoveUserFromGroupOutput, error)
}

func (*MockCognitoIdentityProviderClient) AdminAddUserToGroup added in v1.15.0

func (*MockCognitoIdentityProviderClient) AdminCreateUser added in v1.7.0

AdminCreateUser function

func (*MockCognitoIdentityProviderClient) AdminDisableUser added in v1.15.0

func (*MockCognitoIdentityProviderClient) AdminEnableUser added in v1.15.0

func (*MockCognitoIdentityProviderClient) AdminGetUser added in v1.12.0

func (*MockCognitoIdentityProviderClient) AdminRemoveUserFromGroup added in v1.16.0

func (*MockCognitoIdentityProviderClient) AdminUpdateUserAttributes added in v1.13.0

func (*MockCognitoIdentityProviderClient) AdminUserGlobalSignOut added in v1.7.0

func (*MockCognitoIdentityProviderClient) ConfirmForgotPassword added in v1.14.0

func (*MockCognitoIdentityProviderClient) CreateGroup added in v1.13.0

func (*MockCognitoIdentityProviderClient) DescribeUserPool

func (*MockCognitoIdentityProviderClient) ForgotPassword added in v1.11.0

func (*MockCognitoIdentityProviderClient) GetGroup added in v1.13.0

func (*MockCognitoIdentityProviderClient) GlobalSignOut added in v1.5.0

func (*MockCognitoIdentityProviderClient) InitiateAuth added in v1.7.0

func (*MockCognitoIdentityProviderClient) ListUsers added in v1.7.0

func (*MockCognitoIdentityProviderClient) ListUsersInGroup added in v1.15.0

func (*MockCognitoIdentityProviderClient) RespondToAuthChallenge added in v1.10.0

type Session added in v1.5.0

type Session struct {
	AccessToken  string
	IdToken      string
	RefreshToken string
}

type User added in v1.6.0

type User struct {
	ID          string
	Email       string
	Password    string
	GivenName   string
	FamilyName  string
	Groups      []*Group
	Status      string
	Active      bool
	StatusNotes string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL