library

package
v0.0.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	//RepoCfg holds the configuration used for the repository.
	RepoCfg repository.Config `yaml:"database"`
}

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(fs *flag.FlagSet)

func (*Config) Validate

func (cfg *Config) Validate() error

type Option

type Option func(*libraryServiceImpl) error

Option is an alias for a function that will take in a pointer to an libraryServiceImpl and modify it

func WithLogger

func WithLogger(logger log.Logger) Option

WithLogger applies a given repository to the libraryServiceImpl

func WithMemoryRepository

func WithMemoryRepository() Option

WithMemoryRepository applies a memory repository to the Option

func WithRepository

func WithRepository(repo repository.Repository) Option

WithRepository applies a given repository to the libraryServiceImpl

type Service

type Service interface {
	service.Backend

	librarypb.LibraryServiceServer
}

Service Project Service

func NewLibraryService

func NewLibraryService(cfg Config) (Service, error)

func NewLibraryServiceWithOptions

func NewLibraryServiceWithOptions(cfg Config, opts ...Option) (Service, error)

Directories

Path Synopsis
Package name deals with parsing and formatting resource names used in the Library API
Package name deals with parsing and formatting resource names used in the Library API

Jump to

Keyboard shortcuts

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