zo

package module
v0.0.0-...-5cacd85 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Routing

func Routing(router *httprouter.Router)

Types

type DeleteResponse

type DeleteResponse struct {
	myhttp.ResponseBase
}

type GetAllResponse

type GetAllResponse struct {
	myhttp.ResponseBase
	Zos []Zo `json:"zos"`
}

type GetResponse

type GetResponse struct {
	myhttp.ResponseBase
	Zo *Zo `json:"zo"`
}

type PostResponse

type PostResponse struct {
	myhttp.ResponseBase
	Zo *Zo `json:"zo"`
}

type PutResponse

type PutResponse struct {
	myhttp.ResponseBase
	Zo *Zo `json:"zo"`
}

type Zo

type Zo struct {
	Id              int          `json:"id"`
	AchievementDate time.Time    `json:"achievementdate"`
	Exp             int          `json:"exp"`
	CategoryId      int          `json:"categoryid"`
	Message         string       `json:"message"`
	CreatedAt       time.Time    `json:"createdat"`
	UpdatedAt       sql.NullTime `json:"updatedat"`
}

func NewZo

func NewZo(
	id int,
	achievementDate time.Time,
	exp int,
	categoryId int,
	message string,
	createdAt time.Time,
	updatedAt sql.NullTime,
) Zo

type ZoRepository

type ZoRepository struct {
}

func (*ZoRepository) Create

func (r *ZoRepository) Create(zo *Zo) (int, error)

func (*ZoRepository) Delete

func (r *ZoRepository) Delete(id int) error

func (*ZoRepository) Find

func (r *ZoRepository) Find(id int) (*Zo, error)

func (*ZoRepository) Findall

func (r *ZoRepository) Findall() ([]Zo, error)

func (*ZoRepository) Update

func (r *ZoRepository) Update(zo *Zo) error

type ZoService

type ZoService struct {
	Zr ZoRepository
}

func (*ZoService) Delete

func (s *ZoService) Delete(id int) error

func (*ZoService) Get

func (s *ZoService) Get(id int) (*Zo, error)

func (*ZoService) GetAll

func (s *ZoService) GetAll() ([]Zo, error)

func (*ZoService) Post

func (s *ZoService) Post(z *Zo) (int, error)

func (*ZoService) Update

func (s *ZoService) Update(z *Zo) error

Jump to

Keyboard shortcuts

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