auth

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func (*Controller) AuthByType

func (c *Controller) AuthByType(credentials *dto.Credentials) (interface{}, error)

func (*Controller) GetAccountID

func (*Controller) IsAuthorized

type IController

type IController interface {
	AuthByType(credentials *dto.Credentials) (interface{}, error)
	IsAuthorized(_ context.Context, data *authGrpc.IsAuthorizedData) (*authGrpc.IsAuthorizedResponse, error)
	GetAuthConfig(_ context.Context, data *authGrpc.GetAuthConfigData) (*authGrpc.GetAuthConfigResponse, error)
	GetAccountID(_ context.Context, data *authGrpc.GetAccountIDData) (*authGrpc.GetAccountIDResponse, error)
}

func NewAuthController

func NewAuthController(
	postgresRead relational.InterfaceRead, postgresWrite relational.InterfaceWrite, appConfig *app.Config) IController

type MockAuthController

type MockAuthController struct {
	mock.Mock
}

func (*MockAuthController) AuthByType

func (m *MockAuthController) AuthByType(_ *dto.Credentials) (interface{}, error)

func (*MockAuthController) GetAccountID

func (*MockAuthController) GetAuthConfig

func (*MockAuthController) IsAuthorized

Jump to

Keyboard shortcuts

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