mocks

package
Version: v7.1.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	AuthenticateFunc          func(client.AuthenticatePayload) (client.AuthenticatePayload, error)
	AMInfoFunc                func() (client.AMInfoResponse, error)
	AMInfoSet                 client.AMInfoResponse
	AccessTokenFunc           func(string, string) ([]byte, error)
	AttributesFunc            func(string, string, []string) ([]byte, error)
	UserCodeFunc              func(string, string) ([]byte, error)
	UserTokenFunc             func(string, string) ([]byte, error)
	IntrospectAccessTokenFunc func(string, string) ([]byte, error)
}

MockClient mocks a client.Connection

func (*MockClient) AMInfo

func (m *MockClient) AMInfo() (info client.AMInfoResponse, err error)

func (*MockClient) AccessToken

func (m *MockClient) AccessToken(tokenID string, _ client.ContentType, payload string) (reply []byte, err error)

func (*MockClient) Attributes

func (m *MockClient) Attributes(tokenID string, _ client.ContentType, payload string, names []string) (reply []byte, err error)

func (*MockClient) Authenticate

func (m *MockClient) Authenticate(payload client.AuthenticatePayload) (reply client.AuthenticatePayload, err error)

func (*MockClient) Initialise

func (m *MockClient) Initialise() error

func (*MockClient) IntrospectAccessToken

func (m *MockClient) IntrospectAccessToken(tokenID string, content client.ContentType, payload string) (introspection []byte, err error)

func (*MockClient) LogoutSession

func (m *MockClient) LogoutSession(tokenID string) (err error)

func (*MockClient) UserCode

func (m *MockClient) UserCode(tokenID string, _ client.ContentType, payload string) (reply []byte, err error)

func (*MockClient) UserToken

func (m *MockClient) UserToken(tokenID string, _ client.ContentType, payload string) (reply []byte, err error)

func (*MockClient) ValidateSession

func (m *MockClient) ValidateSession(tokenID string) (ok bool, err error)

type MockSession

type MockSession struct {
	TokenFunc  func() string
	ValidFunc  func() (bool, error)
	LogoutFunc func() error
}

MockSession mocks a session.Session

func (*MockSession) Logout

func (s *MockSession) Logout() error

func (*MockSession) Token

func (s *MockSession) Token() string

func (*MockSession) Valid

func (s *MockSession) Valid() (bool, error)

Jump to

Keyboard shortcuts

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