auth

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 19 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 {
	authGrpc.UnimplementedAuthServiceServer
	// contains filtered or unexported fields
}

func NewAuthController

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

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.GetAccountData) (*authGrpc.GetAccountDataResponse, error)
}

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