service

package
v0.0.0-...-8ba208c Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailIncsonsistentWithProfileIDError

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

func (EmailIncsonsistentWithProfileIDError) Error

type ProfileAlreadyExistsError

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

func (ProfileAlreadyExistsError) Error

type ProfileNotFoundError

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

func (ProfileNotFoundError) Error

func (e ProfileNotFoundError) Error() string

type Service

type Service interface {
	CreateProfile(ctx context.Context, profile entity.ProfileData) (entity.CreateProfileResult, error)
	GetProfile(ctx context.Context, profileID string) (entity.Profile, error)
	UpdateProfile(ctx context.Context, profile entity.ProfileData, profileID string) error
	DeleteProfile(ctx context.Context, profileID string) error
}

func New

func New(config *dbclient.Config) Service

type ServiceImpl

type ServiceImpl struct {
	Client dbclient.Client
	Logger *zerolog.Logger
}

func (ServiceImpl) CreateProfile

func (svc ServiceImpl) CreateProfile(ctx context.Context, profileData entity.ProfileData) (entity.CreateProfileResult, error)

func (ServiceImpl) DeleteProfile

func (svc ServiceImpl) DeleteProfile(ctx context.Context, profileID string) error

func (ServiceImpl) GetProfile

func (svc ServiceImpl) GetProfile(ctx context.Context, profileID string) (entity.Profile, error)

func (ServiceImpl) UpdateProfile

func (svc ServiceImpl) UpdateProfile(ctx context.Context, profileData entity.ProfileData, profileID string) error

Jump to

Keyboard shortcuts

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