users

package
v0.0.0-...-b60b57f Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(logger *zap.Logger, store Store) *Service

func (*Service) Add

func (s *Service) Add(user ports.User) error

func (*Service) Delete

func (s *Service) Delete(id string) error

func (*Service) FindAll

func (s *Service) FindAll() ([]ports.User, error)

func (*Service) FindByID

func (s *Service) FindByID(id string) (ports.User, error)

type Store

type Store interface {
	Create(user User) error
	Delete(id string) error
	FindByID(id string) (User, error)
	FindAll() ([]User, error)
}

type User

type User struct {
	ID   uuid.UUID
	Name string
	Tag  string
}

Directories

Path Synopsis
Package ports provides primitives to interact with the openapi HTTP API.
Package ports provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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