service

package
v0.0.0-...-56eb26a Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(key interface{}) (interface{}, bool)
	Set(key interface{}, value interface{})
}

type Config

type Config struct {
}

type Persistence

type Persistence interface {
	GetProfile(ctx context.Context, id string) (*model.Profile, error)
	GetProfiles(ctx context.Context, ids []string) ([]model.Profile, error)
	UpsertProfile(ctx context.Context, user *model.Profile) error
}

type PubSub

type PubSub interface {
	Publish(context.Context, string, interface{}) error
	Subscribe(string, func(context.Context, string, interface{}) error)
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(config Config, pubsub PubSub, cache Cache, persistence Persistence, logger *otelzap.Logger) *Service

func (*Service) CheckHealth

func (s *Service) CheckHealth() error

func (*Service) GetProfile

func (s *Service) GetProfile(ctx context.Context) (*model.Profile, error)

func (*Service) UpdateProfile

func (s *Service) UpdateProfile(ctx context.Context, profile model.Profile) (*model.Profile, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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