Documentation ¶
Index ¶
- type GopherService
- func (s *GopherService) Create(ctx context.Context, gopher *model.Gopher) error
- func (s *GopherService) Delete(ctx context.Context, id int) error
- func (s *GopherService) Get(ctx context.Context, id int) (*model.Gopher, error)
- func (s *GopherService) List(ctx context.Context) ([]model.Gopher, error)
- func (s *GopherService) Update(ctx context.Context, id int, update *model.Gopher) (*model.Gopher, error)
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 ¶
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 ¶
Get returns a model.Gopher by id.
func (*GopherService) List ¶
List returns a list of all model.Gopher.
Click to show internal directories.
Click to hide internal directories.