service

package
v0.0.0-...-476bcdb Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateParams

type CreateParams struct {
	Name        string       `valid:"required"`
	Description string       `valid:"required"`
	Status      model.Status `valid:"required"`
}

type Service

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

func NewService

func NewService(r repository.Repository) Service

func (Service) Create

func (s Service) Create(ctx context.Context, params CreateParams) (int, error)

func (Service) Delete

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

func (Service) Get

func (s Service) Get(ctx context.Context, id int) (model.ToDo, error)

func (Service) Update

func (s Service) Update(ctx context.Context, params UpdateParams) error

type UpdateParams

type UpdateParams struct {
	ID          int `valid:"required"`
	Name        *string
	Description *string
	Status      *model.Status
}

Jump to

Keyboard shortcuts

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