test

package
v1.20.0-dexcom-api.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2017 License: BSD-3-Clause Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccessToken

func NewAccessToken() string

func NewRestrictedToken

func NewRestrictedToken() string

func NewServiceSecret

func NewServiceSecret() string

func NewSessionToken

func NewSessionToken() string

Types

type Client

func NewClient

func NewClient() *Client

func (*Client) Expectations

func (c *Client) Expectations()

type CreateUserProviderSessionInput

type CreateUserProviderSessionInput struct {
	Context context.Context
	UserID  string
	Create  *auth.ProviderSessionCreate
}

type CreateUserProviderSessionOutput

type CreateUserProviderSessionOutput struct {
	ProviderSession *auth.ProviderSession
	Error           error
}

type CreateUserRestrictedTokenInput

type CreateUserRestrictedTokenInput struct {
	Context context.Context
	UserID  string
	Create  *auth.RestrictedTokenCreate
}

type CreateUserRestrictedTokenOutput

type CreateUserRestrictedTokenOutput struct {
	RestrictedToken *auth.RestrictedToken
	Error           error
}

type DeleteProviderSessionInput

type DeleteProviderSessionInput struct {
	Context context.Context
	ID      string
}

type DeleteRestrictedTokenInput

type DeleteRestrictedTokenInput struct {
	Context context.Context
	ID      string
}

type ExternalAccessor

type ExternalAccessor struct {
	*test.Mock
	ServerSessionTokenInvocations   int
	ServerSessionTokenOutputs       []ServerSessionTokenOutput
	ValidateSessionTokenInvocations int
	ValidateSessionTokenInputs      []ValidateSessionTokenInput
	ValidateSessionTokenOutputs     []ValidateSessionTokenOutput
}

func NewExternalAccessor

func NewExternalAccessor() *ExternalAccessor

func (*ExternalAccessor) Expectations

func (e *ExternalAccessor) Expectations()

func (*ExternalAccessor) ServerSessionToken

func (e *ExternalAccessor) ServerSessionToken() (string, error)

func (*ExternalAccessor) ValidateSessionToken

func (e *ExternalAccessor) ValidateSessionToken(ctx context.Context, token string) (request.Details, error)

type GetProviderSessionInput

type GetProviderSessionInput struct {
	Context context.Context
	ID      string
}

type GetProviderSessionOutput

type GetProviderSessionOutput struct {
	ProviderSession *auth.ProviderSession
	Error           error
}

type GetRestrictedTokenInput

type GetRestrictedTokenInput struct {
	Context context.Context
	ID      string
}

type GetRestrictedTokenOutput

type GetRestrictedTokenOutput struct {
	RestrictedToken *auth.RestrictedToken
	Error           error
}

type ListUserProviderSessionsInput

type ListUserProviderSessionsInput struct {
	Context    context.Context
	UserID     string
	Filter     *auth.ProviderSessionFilter
	Pagination *page.Pagination
}

type ListUserProviderSessionsOutput

type ListUserProviderSessionsOutput struct {
	ProviderSessions auth.ProviderSessions
	Error            error
}

type ListUserRestrictedTokensInput

type ListUserRestrictedTokensInput struct {
	Context    context.Context
	UserID     string
	Filter     *auth.RestrictedTokenFilter
	Pagination *page.Pagination
}

type ListUserRestrictedTokensOutput

type ListUserRestrictedTokensOutput struct {
	RestrictedTokens auth.RestrictedTokens
	Error            error
}

type ProviderSessionAccessor

type ProviderSessionAccessor struct {
	*test.Mock
	ListUserProviderSessionsInvocations  int
	ListUserProviderSessionsInputs       []ListUserProviderSessionsInput
	ListUserProviderSessionsOutputs      []ListUserProviderSessionsOutput
	CreateUserProviderSessionInvocations int
	CreateUserProviderSessionInputs      []CreateUserProviderSessionInput
	CreateUserProviderSessionOutputs     []CreateUserProviderSessionOutput
	GetProviderSessionInvocations        int
	GetProviderSessionInputs             []GetProviderSessionInput
	GetProviderSessionOutputs            []GetProviderSessionOutput
	UpdateProviderSessionInvocations     int
	UpdateProviderSessionInputs          []UpdateProviderSessionInput
	UpdateProviderSessionOutputs         []UpdateProviderSessionOutput
	DeleteProviderSessionInvocations     int
	DeleteProviderSessionInputs          []DeleteProviderSessionInput
	DeleteProviderSessionOutputs         []error
}

func NewProviderSessionAccessor

func NewProviderSessionAccessor() *ProviderSessionAccessor

func (*ProviderSessionAccessor) CreateUserProviderSession

func (p *ProviderSessionAccessor) CreateUserProviderSession(ctx context.Context, userID string, create *auth.ProviderSessionCreate) (*auth.ProviderSession, error)

func (*ProviderSessionAccessor) DeleteProviderSession

func (p *ProviderSessionAccessor) DeleteProviderSession(ctx context.Context, id string) error

func (*ProviderSessionAccessor) Expectations

func (p *ProviderSessionAccessor) Expectations()

func (*ProviderSessionAccessor) GetProviderSession

func (p *ProviderSessionAccessor) GetProviderSession(ctx context.Context, id string) (*auth.ProviderSession, error)

func (*ProviderSessionAccessor) ListUserProviderSessions

func (p *ProviderSessionAccessor) ListUserProviderSessions(ctx context.Context, userID string, filter *auth.ProviderSessionFilter, pagination *page.Pagination) (auth.ProviderSessions, error)

func (*ProviderSessionAccessor) UpdateProviderSession

func (p *ProviderSessionAccessor) UpdateProviderSession(ctx context.Context, id string, update *auth.ProviderSessionUpdate) (*auth.ProviderSession, error)

type RestrictedTokenAccessor

type RestrictedTokenAccessor struct {
	*test.Mock
	ListUserRestrictedTokensInvocations  int
	ListUserRestrictedTokensInputs       []ListUserRestrictedTokensInput
	ListUserRestrictedTokensOutputs      []ListUserRestrictedTokensOutput
	CreateUserRestrictedTokenInvocations int
	CreateUserRestrictedTokenInputs      []CreateUserRestrictedTokenInput
	CreateUserRestrictedTokenOutputs     []CreateUserRestrictedTokenOutput
	GetRestrictedTokenInvocations        int
	GetRestrictedTokenInputs             []GetRestrictedTokenInput
	GetRestrictedTokenOutputs            []GetRestrictedTokenOutput
	UpdateRestrictedTokenInvocations     int
	UpdateRestrictedTokenInputs          []UpdateRestrictedTokenInput
	UpdateRestrictedTokenOutputs         []UpdateRestrictedTokenOutput
	DeleteRestrictedTokenInvocations     int
	DeleteRestrictedTokenInputs          []DeleteRestrictedTokenInput
	DeleteRestrictedTokenOutputs         []error
}

func NewRestrictedTokenAccessor

func NewRestrictedTokenAccessor() *RestrictedTokenAccessor

func (*RestrictedTokenAccessor) CreateUserRestrictedToken

func (r *RestrictedTokenAccessor) CreateUserRestrictedToken(ctx context.Context, userID string, create *auth.RestrictedTokenCreate) (*auth.RestrictedToken, error)

func (*RestrictedTokenAccessor) DeleteRestrictedToken

func (r *RestrictedTokenAccessor) DeleteRestrictedToken(ctx context.Context, id string) error

func (*RestrictedTokenAccessor) Expectations

func (r *RestrictedTokenAccessor) Expectations()

func (*RestrictedTokenAccessor) GetRestrictedToken

func (r *RestrictedTokenAccessor) GetRestrictedToken(ctx context.Context, id string) (*auth.RestrictedToken, error)

func (*RestrictedTokenAccessor) ListUserRestrictedTokens

func (r *RestrictedTokenAccessor) ListUserRestrictedTokens(ctx context.Context, userID string, filter *auth.RestrictedTokenFilter, pagination *page.Pagination) (auth.RestrictedTokens, error)

func (*RestrictedTokenAccessor) UpdateRestrictedToken

func (r *RestrictedTokenAccessor) UpdateRestrictedToken(ctx context.Context, id string, update *auth.RestrictedTokenUpdate) (*auth.RestrictedToken, error)

type ServerSessionTokenOutput

type ServerSessionTokenOutput struct {
	Token string
	Error error
}

type UpdateProviderSessionInput

type UpdateProviderSessionInput struct {
	Context context.Context
	ID      string
	Update  *auth.ProviderSessionUpdate
}

type UpdateProviderSessionOutput

type UpdateProviderSessionOutput struct {
	ProviderSession *auth.ProviderSession
	Error           error
}

type UpdateRestrictedTokenInput

type UpdateRestrictedTokenInput struct {
	Context context.Context
	ID      string
	Update  *auth.RestrictedTokenUpdate
}

type UpdateRestrictedTokenOutput

type UpdateRestrictedTokenOutput struct {
	RestrictedToken *auth.RestrictedToken
	Error           error
}

type ValidateSessionTokenInput

type ValidateSessionTokenInput struct {
	Context context.Context
	Token   string
}

type ValidateSessionTokenOutput

type ValidateSessionTokenOutput struct {
	Details request.Details
	Error   error
}

Jump to

Keyboard shortcuts

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