Documentation ¶
Index ¶
- Variables
- type DeleteResponse
- type GetAllResponse
- type GetResponse
- type PostResponse
- type PutResponse
- type Zo
- type ZoRepository
- func (r *ZoRepository) Create(ctx context.Context, z *Zo) (int, error)
- func (r *ZoRepository) CreateTx(ctx context.Context, tx *sql.Tx, z *Zo) (int, error)
- func (r *ZoRepository) Delete(ctx context.Context, id int) error
- func (r *ZoRepository) Find(ctx context.Context, id int) (*Zo, error)
- func (r *ZoRepository) FindAll(ctx context.Context) ([]Zo, error)
- func (r *ZoRepository) Update(ctx context.Context, z *Zo) error
- type ZoService
- func (s *ZoService) Delete(ctx context.Context, id int) error
- func (s *ZoService) Get(ctx context.Context, id int) (*Zo, error)
- func (s *ZoService) GetAll(ctx context.Context) ([]Zo, error)
- func (s *ZoService) Post(ctx context.Context, z *Zo) (int, error)
- func (s *ZoService) Update(ctx context.Context, z *Zo) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Routes map[myrouter.RouteKey]func(w http.ResponseWriter, r *http.Request, ps common.QueryMap) = map[myrouter.RouteKey]func(w http.ResponseWriter, r *http.Request, ps common.QueryMap){ {Path: "/api/v1/zos", Method: "GET", NeedAuth: true}: zc.getAll, {Path: "/api/v1/zos/:zo_id", Method: "GET", NeedAuth: true}: zc.get, {Path: "/api/v1/zos", Method: "POST", NeedAuth: true}: zc.post, {Path: "/api/v1/zos/:zo_id", Method: "PUT", NeedAuth: true}: zc.update, {Path: "/api/v1/zos/:zo_id", Method: "DELETE", NeedAuth: true}: zc.delete, }
Functions ¶
This section is empty.
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 ZoRepository ¶
type ZoRepository struct { }
type ZoService ¶
type ZoService struct {
Zr ZoRepository
}
Click to show internal directories.
Click to hide internal directories.