service

package
v0.0.0-...-43a96cf Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseStorageError

func ParseStorageError(err error, id interface{}, noun string) error

ParseStorageError parses common storage errors into a user-readable format.

Types

type Service

type Service struct {
	Logger      logger.Logger
	ConnFactory *secureconn.Factory
	Storage     storage.Storage
	AuthzClient authz.PoliciesServiceClient
}

Service holds the internal state and configuration of the Teams service.

func NewInMemoryService

func NewInMemoryService(l logger.Logger, connFactory *secureconn.Factory,
	authzClient authz.PoliciesServiceClient) (*Service, error)

NewInMemoryService returns an instance of Service that uses the memstore storage backend.

func NewPostgresService

func NewPostgresService(l logger.Logger, connFactory *secureconn.Factory, migrationsConfig migration.Config,
	authzPoliciesClient authz.PoliciesServiceClient, authzAuthorizationClient authz.AuthorizationServiceClient) (*Service, error)

NewPostgresService returns an instance of Service that connects to a postgres storage backend.

Jump to

Keyboard shortcuts

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