service

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

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.SubjectPurgeClient
}

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

func NewInMemoryService

func NewInMemoryService(l logger.Logger, connFactory *secureconn.Factory,
	authzClient authz.SubjectPurgeClient) (*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,
	dataMigrationsConfig datamigration.Config, authzClient authz.SubjectPurgeClient,
	authzV2Client authz_v2.PoliciesClient) (*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