service

package
v0.0.0-...-aec1c34 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBasicAuthzService

func NewBasicAuthzService() *basicAuthzService

NewBasicAuthzService returns a naive, stateless implementation of AuthzService

Types

type IAuthzService

type IAuthzService interface {
	UpsertPolicy(ctx context.Context, sub, resourceType, resourceID, action string) error
	ListPolicy(ctx context.Context, reqObj dto.ListPolicyRequest) dto.ListPolicyResponse
	RemovePolicy(ctx context.Context, sub, resourceType, resourceID, action string) error
	RemovePolicyBySub(ctx context.Context, sub string) error
}

func New

func New(logger *cl.CustomLogger, svcconfs ...SvcConf) IAuthzService

New returns a AuthzService implementation with all of the expected config/middleware wired in.

type SvcConf

type SvcConf func(*basicAuthzService) error

func WithNATSEncodedConn

func WithNATSEncodedConn(nc *nats.EncodedConn) SvcConf

func WithRepo

func WithRepo(r repo.AuthzRepo) SvcConf

Jump to

Keyboard shortcuts

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