service

package
v0.0.0-...-246a067 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GopherService

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

GopherService is the service to manage the model.Gopher model.

func NewGopherService

func NewGopherService(repository *repository.GopherRepository, config *config.Config) *GopherService

NewGopherService returns a new NewGopherService.

func (*GopherService) Create

func (s *GopherService) Create(ctx context.Context, gopher *model.Gopher) error

Create creates a new model.Gopher.

func (*GopherService) Delete

func (s *GopherService) Delete(ctx context.Context, id int) error

Delete deletes a model.Gopher by id.

func (*GopherService) Get

func (s *GopherService) Get(ctx context.Context, id int) (*model.Gopher, error)

Get returns a model.Gopher by id.

func (*GopherService) List

func (s *GopherService) List(ctx context.Context) ([]model.Gopher, error)

List returns a list of all model.Gopher.

func (*GopherService) Update

func (s *GopherService) Update(ctx context.Context, id int, update *model.Gopher) (*model.Gopher, error)

Update updates a provided model.Gopher.

Jump to

Keyboard shortcuts

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