Documentation ¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type CategoryCreate
- func (s *CategoryCreate) Decode(d *jx.Decoder) error
- func (c *CategoryCreate) Elem() CategoryCreate
- func (s *CategoryCreate) Encode(e *jx.Encoder)
- func (s *CategoryCreate) GetID() int
- func (s *CategoryCreate) GetName() string
- func (s *CategoryCreate) MarshalJSON() ([]byte, error)
- func (s *CategoryCreate) SetID(val int)
- func (s *CategoryCreate) SetName(val string)
- func (s *CategoryCreate) UnmarshalJSON(data []byte) error
- type CategoryList
- func (s *CategoryList) Decode(d *jx.Decoder) error
- func (c *CategoryList) Elem() CategoryList
- func (s *CategoryList) Encode(e *jx.Encoder)
- func (s *CategoryList) GetID() int
- func (s *CategoryList) GetName() string
- func (s *CategoryList) MarshalJSON() ([]byte, error)
- func (s *CategoryList) SetID(val int)
- func (s *CategoryList) SetName(val string)
- func (s *CategoryList) UnmarshalJSON(data []byte) error
- type CategoryPetsList
- func (s *CategoryPetsList) Decode(d *jx.Decoder) error
- func (pe *CategoryPetsList) Elem() CategoryPetsList
- func (s *CategoryPetsList) Encode(e *jx.Encoder)
- func (s *CategoryPetsList) GetBirthday() OptDateTime
- func (s *CategoryPetsList) GetID() int
- func (s *CategoryPetsList) GetName() string
- func (s *CategoryPetsList) GetWeight() OptInt
- func (s *CategoryPetsList) MarshalJSON() ([]byte, error)
- func (s *CategoryPetsList) SetBirthday(val OptDateTime)
- func (s *CategoryPetsList) SetID(val int)
- func (s *CategoryPetsList) SetName(val string)
- func (s *CategoryPetsList) SetWeight(val OptInt)
- func (s *CategoryPetsList) UnmarshalJSON(data []byte) error
- type CategoryRead
- func (s *CategoryRead) Decode(d *jx.Decoder) error
- func (c *CategoryRead) Elem() CategoryRead
- func (s *CategoryRead) Encode(e *jx.Encoder)
- func (s *CategoryRead) GetID() int
- func (s *CategoryRead) GetName() string
- func (s *CategoryRead) MarshalJSON() ([]byte, error)
- func (s *CategoryRead) SetID(val int)
- func (s *CategoryRead) SetName(val string)
- func (s *CategoryRead) UnmarshalJSON(data []byte) error
- type CategoryUpdate
- func (s *CategoryUpdate) Decode(d *jx.Decoder) error
- func (c *CategoryUpdate) Elem() CategoryUpdate
- func (s *CategoryUpdate) Encode(e *jx.Encoder)
- func (s *CategoryUpdate) GetID() int
- func (s *CategoryUpdate) GetName() string
- func (s *CategoryUpdate) MarshalJSON() ([]byte, error)
- func (s *CategoryUpdate) SetID(val int)
- func (s *CategoryUpdate) SetName(val string)
- func (s *CategoryUpdate) UnmarshalJSON(data []byte) error
- type Client
- func (c *Client) CreateCategory(ctx context.Context, request *CreateCategoryReq) (CreateCategoryRes, error)
- func (c *Client) CreatePet(ctx context.Context, request *CreatePetReq) (CreatePetRes, error)
- func (c *Client) CreateUser(ctx context.Context, request *CreateUserReq) (CreateUserRes, error)
- func (c *Client) DBHealth(ctx context.Context) (DBHealthRes, error)
- func (c *Client) DeleteCategory(ctx context.Context, params DeleteCategoryParams) (DeleteCategoryRes, error)
- func (c *Client) DeletePet(ctx context.Context, params DeletePetParams) (DeletePetRes, error)
- func (c *Client) DeleteUser(ctx context.Context, params DeleteUserParams) (DeleteUserRes, error)
- func (c *Client) ListCategory(ctx context.Context, params ListCategoryParams) (ListCategoryRes, error)
- func (c *Client) ListCategoryPets(ctx context.Context, params ListCategoryPetsParams) (ListCategoryPetsRes, error)
- func (c *Client) ListPet(ctx context.Context, params ListPetParams) (ListPetRes, error)
- func (c *Client) ListPetCategories(ctx context.Context, params ListPetCategoriesParams) (ListPetCategoriesRes, error)
- func (c *Client) ListPetFriends(ctx context.Context, params ListPetFriendsParams) (ListPetFriendsRes, error)
- func (c *Client) ListUser(ctx context.Context, params ListUserParams) (ListUserRes, error)
- func (c *Client) ListUserPets(ctx context.Context, params ListUserPetsParams) (ListUserPetsRes, error)
- func (c *Client) ReadCategory(ctx context.Context, params ReadCategoryParams) (ReadCategoryRes, error)
- func (c *Client) ReadPet(ctx context.Context, params ReadPetParams) (ReadPetRes, error)
- func (c *Client) ReadPetOwner(ctx context.Context, params ReadPetOwnerParams) (ReadPetOwnerRes, error)
- func (c *Client) ReadUser(ctx context.Context, params ReadUserParams) (ReadUserRes, error)
- func (c *Client) UpdateCategory(ctx context.Context, request *UpdateCategoryReq, params UpdateCategoryParams) (UpdateCategoryRes, error)
- func (c *Client) UpdatePet(ctx context.Context, request *UpdatePetReq, params UpdatePetParams) (UpdatePetRes, error)
- func (c *Client) UpdateUser(ctx context.Context, request *UpdateUserReq, params UpdateUserParams) (UpdateUserRes, error)
- type ClientOption
- type CreateCategoryReq
- func (s *CreateCategoryReq) Decode(d *jx.Decoder) error
- func (s *CreateCategoryReq) Encode(e *jx.Encoder)
- func (s *CreateCategoryReq) GetName() string
- func (s *CreateCategoryReq) GetPets() []int
- func (s *CreateCategoryReq) MarshalJSON() ([]byte, error)
- func (s *CreateCategoryReq) SetName(val string)
- func (s *CreateCategoryReq) SetPets(val []int)
- func (s *CreateCategoryReq) UnmarshalJSON(data []byte) error
- type CreateCategoryRes
- type CreatePetReq
- func (s *CreatePetReq) Decode(d *jx.Decoder) error
- func (s *CreatePetReq) Encode(e *jx.Encoder)
- func (s *CreatePetReq) GetBirthday() OptDateTime
- func (s *CreatePetReq) GetCategories() []int
- func (s *CreatePetReq) GetFriends() []int
- func (s *CreatePetReq) GetName() string
- func (s *CreatePetReq) GetOwner() int
- func (s *CreatePetReq) GetWeight() OptInt
- func (s *CreatePetReq) MarshalJSON() ([]byte, error)
- func (s *CreatePetReq) SetBirthday(val OptDateTime)
- func (s *CreatePetReq) SetCategories(val []int)
- func (s *CreatePetReq) SetFriends(val []int)
- func (s *CreatePetReq) SetName(val string)
- func (s *CreatePetReq) SetOwner(val int)
- func (s *CreatePetReq) SetWeight(val OptInt)
- func (s *CreatePetReq) UnmarshalJSON(data []byte) error
- type CreatePetRes
- type CreateUserReq
- func (s *CreateUserReq) Decode(d *jx.Decoder) error
- func (s *CreateUserReq) Encode(e *jx.Encoder)
- func (s *CreateUserReq) GetAge() int
- func (s *CreateUserReq) GetName() string
- func (s *CreateUserReq) GetPets() []int
- func (s *CreateUserReq) MarshalJSON() ([]byte, error)
- func (s *CreateUserReq) SetAge(val int)
- func (s *CreateUserReq) SetName(val string)
- func (s *CreateUserReq) SetPets(val []int)
- func (s *CreateUserReq) UnmarshalJSON(data []byte) error
- type CreateUserRes
- type DBHealthNoContent
- type DBHealthRes
- type DBHealthServiceUnavailable
- type DeleteCategoryNoContent
- type DeleteCategoryParams
- type DeleteCategoryRes
- type DeletePetNoContent
- type DeletePetParams
- type DeletePetRes
- type DeleteUserNoContent
- type DeleteUserParams
- type DeleteUserRes
- type ErrorHandler
- type Handler
- type ListCategoryOKApplicationJSON
- func (s *ListCategoryOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListCategoryOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListCategoryOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListCategoryOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListCategoryOKApplicationJSON) Validate() error
- type ListCategoryParams
- type ListCategoryPetsOKApplicationJSON
- func (s *ListCategoryPetsOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListCategoryPetsOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListCategoryPetsOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListCategoryPetsOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListCategoryPetsOKApplicationJSON) Validate() error
- type ListCategoryPetsParams
- type ListCategoryPetsRes
- type ListCategoryRes
- type ListPetCategoriesOKApplicationJSON
- func (s *ListPetCategoriesOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListPetCategoriesOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListPetCategoriesOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListPetCategoriesOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListPetCategoriesOKApplicationJSON) Validate() error
- type ListPetCategoriesParams
- type ListPetCategoriesRes
- type ListPetFriendsOKApplicationJSON
- func (s *ListPetFriendsOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListPetFriendsOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListPetFriendsOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListPetFriendsOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListPetFriendsOKApplicationJSON) Validate() error
- type ListPetFriendsParams
- type ListPetFriendsRes
- type ListPetOKApplicationJSON
- func (s *ListPetOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListPetOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListPetOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListPetOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListPetOKApplicationJSON) Validate() error
- type ListPetParams
- type ListPetRes
- type ListUserOKApplicationJSON
- func (s *ListUserOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListUserOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListUserOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListUserOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListUserOKApplicationJSON) Validate() error
- type ListUserParams
- type ListUserPetsOKApplicationJSON
- func (s *ListUserPetsOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListUserPetsOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListUserPetsOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListUserPetsOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListUserPetsOKApplicationJSON) Validate() error
- type ListUserPetsParams
- type ListUserPetsRes
- type ListUserRes
- type Middleware
- type OgentHandler
- func (h *OgentHandler) CreateCategory(ctx context.Context, req *CreateCategoryReq) (CreateCategoryRes, error)
- func (h *OgentHandler) CreatePet(ctx context.Context, req *CreatePetReq) (CreatePetRes, error)
- func (h *OgentHandler) CreateUser(ctx context.Context, req *CreateUserReq) (CreateUserRes, error)
- func (h *OgentHandler) DeleteCategory(ctx context.Context, params DeleteCategoryParams) (DeleteCategoryRes, error)
- func (h *OgentHandler) DeletePet(ctx context.Context, params DeletePetParams) (DeletePetRes, error)
- func (h *OgentHandler) DeleteUser(ctx context.Context, params DeleteUserParams) (DeleteUserRes, error)
- func (h *OgentHandler) ListCategory(ctx context.Context, params ListCategoryParams) (ListCategoryRes, error)
- func (h *OgentHandler) ListCategoryPets(ctx context.Context, params ListCategoryPetsParams) (ListCategoryPetsRes, error)
- func (h *OgentHandler) ListPet(ctx context.Context, params ListPetParams) (ListPetRes, error)
- func (h *OgentHandler) ListPetCategories(ctx context.Context, params ListPetCategoriesParams) (ListPetCategoriesRes, error)
- func (h *OgentHandler) ListPetFriends(ctx context.Context, params ListPetFriendsParams) (ListPetFriendsRes, error)
- func (h *OgentHandler) ListUser(ctx context.Context, params ListUserParams) (ListUserRes, error)
- func (h *OgentHandler) ListUserPets(ctx context.Context, params ListUserPetsParams) (ListUserPetsRes, error)
- func (h *OgentHandler) ReadCategory(ctx context.Context, params ReadCategoryParams) (ReadCategoryRes, error)
- func (h *OgentHandler) ReadPet(ctx context.Context, params ReadPetParams) (ReadPetRes, error)
- func (h *OgentHandler) ReadPetOwner(ctx context.Context, params ReadPetOwnerParams) (ReadPetOwnerRes, error)
- func (h *OgentHandler) ReadUser(ctx context.Context, params ReadUserParams) (ReadUserRes, error)
- func (h *OgentHandler) UpdateCategory(ctx context.Context, req *UpdateCategoryReq, params UpdateCategoryParams) (UpdateCategoryRes, error)
- func (h *OgentHandler) UpdatePet(ctx context.Context, req *UpdatePetReq, params UpdatePetParams) (UpdatePetRes, error)
- func (h *OgentHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, params UpdateUserParams) (UpdateUserRes, error)
- type OptDateTime
- func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error
- func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))
- func (o OptDateTime) Get() (v time.Time, ok bool)
- func (o OptDateTime) IsSet() bool
- func (s OptDateTime) MarshalJSON() ([]byte, error)
- func (o OptDateTime) Or(d time.Time) time.Time
- func (o *OptDateTime) Reset()
- func (o *OptDateTime) SetTo(v time.Time)
- func (s *OptDateTime) UnmarshalJSON(data []byte) error
- type OptInt
- func (o *OptInt) Decode(d *jx.Decoder) error
- func (o OptInt) Encode(e *jx.Encoder)
- func (o OptInt) Get() (v int, ok bool)
- func (o OptInt) IsSet() bool
- func (s OptInt) MarshalJSON() ([]byte, error)
- func (o OptInt) Or(d int) int
- func (o *OptInt) Reset()
- func (o *OptInt) SetTo(v int)
- func (s *OptInt) UnmarshalJSON(data []byte) error
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type Option
- type PetCategoriesList
- func (s *PetCategoriesList) Decode(d *jx.Decoder) error
- func (c *PetCategoriesList) Elem() PetCategoriesList
- func (s *PetCategoriesList) Encode(e *jx.Encoder)
- func (s *PetCategoriesList) GetID() int
- func (s *PetCategoriesList) GetName() string
- func (s *PetCategoriesList) MarshalJSON() ([]byte, error)
- func (s *PetCategoriesList) SetID(val int)
- func (s *PetCategoriesList) SetName(val string)
- func (s *PetCategoriesList) UnmarshalJSON(data []byte) error
- type PetCreate
- func (s *PetCreate) Decode(d *jx.Decoder) error
- func (pe *PetCreate) Elem() PetCreate
- func (s *PetCreate) Encode(e *jx.Encoder)
- func (s *PetCreate) GetBirthday() OptDateTime
- func (s *PetCreate) GetCategories() []PetCreateCategories
- func (s *PetCreate) GetID() int
- func (s *PetCreate) GetName() string
- func (s *PetCreate) GetOwner() PetCreateOwner
- func (s *PetCreate) GetWeight() OptInt
- func (s *PetCreate) MarshalJSON() ([]byte, error)
- func (s *PetCreate) SetBirthday(val OptDateTime)
- func (s *PetCreate) SetCategories(val []PetCreateCategories)
- func (s *PetCreate) SetID(val int)
- func (s *PetCreate) SetName(val string)
- func (s *PetCreate) SetOwner(val PetCreateOwner)
- func (s *PetCreate) SetWeight(val OptInt)
- func (s *PetCreate) UnmarshalJSON(data []byte) error
- type PetCreateCategories
- func (s *PetCreateCategories) Decode(d *jx.Decoder) error
- func (c *PetCreateCategories) Elem() PetCreateCategories
- func (s *PetCreateCategories) Encode(e *jx.Encoder)
- func (s *PetCreateCategories) GetID() int
- func (s *PetCreateCategories) GetName() string
- func (s *PetCreateCategories) MarshalJSON() ([]byte, error)
- func (s *PetCreateCategories) SetID(val int)
- func (s *PetCreateCategories) SetName(val string)
- func (s *PetCreateCategories) UnmarshalJSON(data []byte) error
- type PetCreateOwner
- func (s *PetCreateOwner) Decode(d *jx.Decoder) error
- func (u *PetCreateOwner) Elem() PetCreateOwner
- func (s *PetCreateOwner) Encode(e *jx.Encoder)
- func (s *PetCreateOwner) GetAge() int
- func (s *PetCreateOwner) GetID() int
- func (s *PetCreateOwner) GetName() string
- func (s *PetCreateOwner) MarshalJSON() ([]byte, error)
- func (s *PetCreateOwner) SetAge(val int)
- func (s *PetCreateOwner) SetID(val int)
- func (s *PetCreateOwner) SetName(val string)
- func (s *PetCreateOwner) UnmarshalJSON(data []byte) error
- type PetFriendsList
- func (s *PetFriendsList) Decode(d *jx.Decoder) error
- func (pe *PetFriendsList) Elem() PetFriendsList
- func (s *PetFriendsList) Encode(e *jx.Encoder)
- func (s *PetFriendsList) GetBirthday() OptDateTime
- func (s *PetFriendsList) GetID() int
- func (s *PetFriendsList) GetName() string
- func (s *PetFriendsList) GetWeight() OptInt
- func (s *PetFriendsList) MarshalJSON() ([]byte, error)
- func (s *PetFriendsList) SetBirthday(val OptDateTime)
- func (s *PetFriendsList) SetID(val int)
- func (s *PetFriendsList) SetName(val string)
- func (s *PetFriendsList) SetWeight(val OptInt)
- func (s *PetFriendsList) UnmarshalJSON(data []byte) error
- type PetList
- func (s *PetList) Decode(d *jx.Decoder) error
- func (pe *PetList) Elem() PetList
- func (s *PetList) Encode(e *jx.Encoder)
- func (s *PetList) GetBirthday() OptDateTime
- func (s *PetList) GetID() int
- func (s *PetList) GetName() string
- func (s *PetList) GetWeight() OptInt
- func (s *PetList) MarshalJSON() ([]byte, error)
- func (s *PetList) SetBirthday(val OptDateTime)
- func (s *PetList) SetID(val int)
- func (s *PetList) SetName(val string)
- func (s *PetList) SetWeight(val OptInt)
- func (s *PetList) UnmarshalJSON(data []byte) error
- type PetOwnerRead
- func (s *PetOwnerRead) Decode(d *jx.Decoder) error
- func (u *PetOwnerRead) Elem() PetOwnerRead
- func (s *PetOwnerRead) Encode(e *jx.Encoder)
- func (s *PetOwnerRead) GetAge() int
- func (s *PetOwnerRead) GetID() int
- func (s *PetOwnerRead) GetName() string
- func (s *PetOwnerRead) MarshalJSON() ([]byte, error)
- func (s *PetOwnerRead) SetAge(val int)
- func (s *PetOwnerRead) SetID(val int)
- func (s *PetOwnerRead) SetName(val string)
- func (s *PetOwnerRead) UnmarshalJSON(data []byte) error
- type PetRead
- func (s *PetRead) Decode(d *jx.Decoder) error
- func (pe *PetRead) Elem() PetRead
- func (s *PetRead) Encode(e *jx.Encoder)
- func (s *PetRead) GetBirthday() OptDateTime
- func (s *PetRead) GetID() int
- func (s *PetRead) GetName() string
- func (s *PetRead) GetWeight() OptInt
- func (s *PetRead) MarshalJSON() ([]byte, error)
- func (s *PetRead) SetBirthday(val OptDateTime)
- func (s *PetRead) SetID(val int)
- func (s *PetRead) SetName(val string)
- func (s *PetRead) SetWeight(val OptInt)
- func (s *PetRead) UnmarshalJSON(data []byte) error
- type PetUpdate
- func (s *PetUpdate) Decode(d *jx.Decoder) error
- func (pe *PetUpdate) Elem() PetUpdate
- func (s *PetUpdate) Encode(e *jx.Encoder)
- func (s *PetUpdate) GetBirthday() OptDateTime
- func (s *PetUpdate) GetID() int
- func (s *PetUpdate) GetName() string
- func (s *PetUpdate) GetWeight() OptInt
- func (s *PetUpdate) MarshalJSON() ([]byte, error)
- func (s *PetUpdate) SetBirthday(val OptDateTime)
- func (s *PetUpdate) SetID(val int)
- func (s *PetUpdate) SetName(val string)
- func (s *PetUpdate) SetWeight(val OptInt)
- func (s *PetUpdate) UnmarshalJSON(data []byte) error
- type R400
- func (s *R400) Decode(d *jx.Decoder) error
- func (s *R400) Encode(e *jx.Encoder)
- func (s *R400) GetCode() int
- func (s *R400) GetErrors() jx.Raw
- func (s *R400) GetStatus() string
- func (s *R400) MarshalJSON() ([]byte, error)
- func (s *R400) SetCode(val int)
- func (s *R400) SetErrors(val jx.Raw)
- func (s *R400) SetStatus(val string)
- func (s *R400) UnmarshalJSON(data []byte) error
- type R404
- func (s *R404) Decode(d *jx.Decoder) error
- func (s *R404) Encode(e *jx.Encoder)
- func (s *R404) GetCode() int
- func (s *R404) GetErrors() jx.Raw
- func (s *R404) GetStatus() string
- func (s *R404) MarshalJSON() ([]byte, error)
- func (s *R404) SetCode(val int)
- func (s *R404) SetErrors(val jx.Raw)
- func (s *R404) SetStatus(val string)
- func (s *R404) UnmarshalJSON(data []byte) error
- type R409
- func (s *R409) Decode(d *jx.Decoder) error
- func (s *R409) Encode(e *jx.Encoder)
- func (s *R409) GetCode() int
- func (s *R409) GetErrors() jx.Raw
- func (s *R409) GetStatus() string
- func (s *R409) MarshalJSON() ([]byte, error)
- func (s *R409) SetCode(val int)
- func (s *R409) SetErrors(val jx.Raw)
- func (s *R409) SetStatus(val string)
- func (s *R409) UnmarshalJSON(data []byte) error
- type R500
- func (s *R500) Decode(d *jx.Decoder) error
- func (s *R500) Encode(e *jx.Encoder)
- func (s *R500) GetCode() int
- func (s *R500) GetErrors() jx.Raw
- func (s *R500) GetStatus() string
- func (s *R500) MarshalJSON() ([]byte, error)
- func (s *R500) SetCode(val int)
- func (s *R500) SetErrors(val jx.Raw)
- func (s *R500) SetStatus(val string)
- func (s *R500) UnmarshalJSON(data []byte) error
- type ReadCategoryParams
- type ReadCategoryRes
- type ReadPetOwnerParams
- type ReadPetOwnerRes
- type ReadPetParams
- type ReadPetRes
- type ReadUserParams
- type ReadUserRes
- type Route
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type UnimplementedHandler
- func (UnimplementedHandler) CreateCategory(ctx context.Context, req *CreateCategoryReq) (r CreateCategoryRes, _ error)
- func (UnimplementedHandler) CreatePet(ctx context.Context, req *CreatePetReq) (r CreatePetRes, _ error)
- func (UnimplementedHandler) CreateUser(ctx context.Context, req *CreateUserReq) (r CreateUserRes, _ error)
- func (UnimplementedHandler) DBHealth(ctx context.Context) (r DBHealthRes, _ error)
- func (UnimplementedHandler) DeleteCategory(ctx context.Context, params DeleteCategoryParams) (r DeleteCategoryRes, _ error)
- func (UnimplementedHandler) DeletePet(ctx context.Context, params DeletePetParams) (r DeletePetRes, _ error)
- func (UnimplementedHandler) DeleteUser(ctx context.Context, params DeleteUserParams) (r DeleteUserRes, _ error)
- func (UnimplementedHandler) ListCategory(ctx context.Context, params ListCategoryParams) (r ListCategoryRes, _ error)
- func (UnimplementedHandler) ListCategoryPets(ctx context.Context, params ListCategoryPetsParams) (r ListCategoryPetsRes, _ error)
- func (UnimplementedHandler) ListPet(ctx context.Context, params ListPetParams) (r ListPetRes, _ error)
- func (UnimplementedHandler) ListPetCategories(ctx context.Context, params ListPetCategoriesParams) (r ListPetCategoriesRes, _ error)
- func (UnimplementedHandler) ListPetFriends(ctx context.Context, params ListPetFriendsParams) (r ListPetFriendsRes, _ error)
- func (UnimplementedHandler) ListUser(ctx context.Context, params ListUserParams) (r ListUserRes, _ error)
- func (UnimplementedHandler) ListUserPets(ctx context.Context, params ListUserPetsParams) (r ListUserPetsRes, _ error)
- func (UnimplementedHandler) ReadCategory(ctx context.Context, params ReadCategoryParams) (r ReadCategoryRes, _ error)
- func (UnimplementedHandler) ReadPet(ctx context.Context, params ReadPetParams) (r ReadPetRes, _ error)
- func (UnimplementedHandler) ReadPetOwner(ctx context.Context, params ReadPetOwnerParams) (r ReadPetOwnerRes, _ error)
- func (UnimplementedHandler) ReadUser(ctx context.Context, params ReadUserParams) (r ReadUserRes, _ error)
- func (UnimplementedHandler) UpdateCategory(ctx context.Context, req *UpdateCategoryReq, params UpdateCategoryParams) (r UpdateCategoryRes, _ error)
- func (UnimplementedHandler) UpdatePet(ctx context.Context, req *UpdatePetReq, params UpdatePetParams) (r UpdatePetRes, _ error)
- func (UnimplementedHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, params UpdateUserParams) (r UpdateUserRes, _ error)
- type UpdateCategoryParams
- type UpdateCategoryReq
- func (s *UpdateCategoryReq) Decode(d *jx.Decoder) error
- func (s *UpdateCategoryReq) Encode(e *jx.Encoder)
- func (s *UpdateCategoryReq) GetName() OptString
- func (s *UpdateCategoryReq) GetPets() []int
- func (s *UpdateCategoryReq) MarshalJSON() ([]byte, error)
- func (s *UpdateCategoryReq) SetName(val OptString)
- func (s *UpdateCategoryReq) SetPets(val []int)
- func (s *UpdateCategoryReq) UnmarshalJSON(data []byte) error
- type UpdateCategoryRes
- type UpdatePetParams
- type UpdatePetReq
- func (s *UpdatePetReq) Decode(d *jx.Decoder) error
- func (s *UpdatePetReq) Encode(e *jx.Encoder)
- func (s *UpdatePetReq) GetBirthday() OptDateTime
- func (s *UpdatePetReq) GetCategories() []int
- func (s *UpdatePetReq) GetFriends() []int
- func (s *UpdatePetReq) GetName() OptString
- func (s *UpdatePetReq) GetOwner() OptInt
- func (s *UpdatePetReq) GetWeight() OptInt
- func (s *UpdatePetReq) MarshalJSON() ([]byte, error)
- func (s *UpdatePetReq) SetBirthday(val OptDateTime)
- func (s *UpdatePetReq) SetCategories(val []int)
- func (s *UpdatePetReq) SetFriends(val []int)
- func (s *UpdatePetReq) SetName(val OptString)
- func (s *UpdatePetReq) SetOwner(val OptInt)
- func (s *UpdatePetReq) SetWeight(val OptInt)
- func (s *UpdatePetReq) UnmarshalJSON(data []byte) error
- type UpdatePetRes
- type UpdateUserParams
- type UpdateUserReq
- func (s *UpdateUserReq) Decode(d *jx.Decoder) error
- func (s *UpdateUserReq) Encode(e *jx.Encoder)
- func (s *UpdateUserReq) GetAge() OptInt
- func (s *UpdateUserReq) GetName() OptString
- func (s *UpdateUserReq) GetPets() []int
- func (s *UpdateUserReq) MarshalJSON() ([]byte, error)
- func (s *UpdateUserReq) SetAge(val OptInt)
- func (s *UpdateUserReq) SetName(val OptString)
- func (s *UpdateUserReq) SetPets(val []int)
- func (s *UpdateUserReq) UnmarshalJSON(data []byte) error
- type UpdateUserRes
- type UserCreate
- func (s *UserCreate) Decode(d *jx.Decoder) error
- func (u *UserCreate) Elem() UserCreate
- func (s *UserCreate) Encode(e *jx.Encoder)
- func (s *UserCreate) GetAge() int
- func (s *UserCreate) GetID() int
- func (s *UserCreate) GetName() string
- func (s *UserCreate) MarshalJSON() ([]byte, error)
- func (s *UserCreate) SetAge(val int)
- func (s *UserCreate) SetID(val int)
- func (s *UserCreate) SetName(val string)
- func (s *UserCreate) UnmarshalJSON(data []byte) error
- type UserList
- func (s *UserList) Decode(d *jx.Decoder) error
- func (u *UserList) Elem() UserList
- func (s *UserList) Encode(e *jx.Encoder)
- func (s *UserList) GetAge() int
- func (s *UserList) GetID() int
- func (s *UserList) GetName() string
- func (s *UserList) MarshalJSON() ([]byte, error)
- func (s *UserList) SetAge(val int)
- func (s *UserList) SetID(val int)
- func (s *UserList) SetName(val string)
- func (s *UserList) UnmarshalJSON(data []byte) error
- type UserPetsList
- func (s *UserPetsList) Decode(d *jx.Decoder) error
- func (pe *UserPetsList) Elem() UserPetsList
- func (s *UserPetsList) Encode(e *jx.Encoder)
- func (s *UserPetsList) GetBirthday() OptDateTime
- func (s *UserPetsList) GetID() int
- func (s *UserPetsList) GetName() string
- func (s *UserPetsList) GetWeight() OptInt
- func (s *UserPetsList) MarshalJSON() ([]byte, error)
- func (s *UserPetsList) SetBirthday(val OptDateTime)
- func (s *UserPetsList) SetID(val int)
- func (s *UserPetsList) SetName(val string)
- func (s *UserPetsList) SetWeight(val OptInt)
- func (s *UserPetsList) UnmarshalJSON(data []byte) error
- type UserRead
- func (s *UserRead) Decode(d *jx.Decoder) error
- func (u *UserRead) Elem() UserRead
- func (s *UserRead) Encode(e *jx.Encoder)
- func (s *UserRead) GetAge() int
- func (s *UserRead) GetID() int
- func (s *UserRead) GetName() string
- func (s *UserRead) MarshalJSON() ([]byte, error)
- func (s *UserRead) SetAge(val int)
- func (s *UserRead) SetID(val int)
- func (s *UserRead) SetName(val string)
- func (s *UserRead) UnmarshalJSON(data []byte) error
- type UserUpdate
- func (s *UserUpdate) Decode(d *jx.Decoder) error
- func (u *UserUpdate) Elem() UserUpdate
- func (s *UserUpdate) Encode(e *jx.Encoder)
- func (s *UserUpdate) GetAge() int
- func (s *UserUpdate) GetID() int
- func (s *UserUpdate) GetName() string
- func (s *UserUpdate) MarshalJSON() ([]byte, error)
- func (s *UserUpdate) SetAge(val int)
- func (s *UserUpdate) SetID(val int)
- func (s *UserUpdate) SetName(val string)
- func (s *UserUpdate) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CategoryCreate ¶
Ref: #/components/schemas/CategoryCreate
func NewCategoryCreate ¶
func NewCategoryCreate(e *ent.Category) *CategoryCreate
func NewCategoryCreates ¶
func NewCategoryCreates(es []*ent.Category) []CategoryCreate
func (*CategoryCreate) Decode ¶
func (s *CategoryCreate) Decode(d *jx.Decoder) error
Decode decodes CategoryCreate from json.
func (*CategoryCreate) Elem ¶
func (c *CategoryCreate) Elem() CategoryCreate
func (*CategoryCreate) Encode ¶
func (s *CategoryCreate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CategoryCreate) GetName ¶
func (s *CategoryCreate) GetName() string
GetName returns the value of Name.
func (*CategoryCreate) MarshalJSON ¶
func (s *CategoryCreate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CategoryCreate) SetName ¶
func (s *CategoryCreate) SetName(val string)
SetName sets the value of Name.
func (*CategoryCreate) UnmarshalJSON ¶
func (s *CategoryCreate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CategoryList ¶
Ref: #/components/schemas/CategoryList
func NewCategoryList ¶
func NewCategoryList(e *ent.Category) *CategoryList
func NewCategoryLists ¶
func NewCategoryLists(es []*ent.Category) []CategoryList
func (*CategoryList) Decode ¶
func (s *CategoryList) Decode(d *jx.Decoder) error
Decode decodes CategoryList from json.
func (*CategoryList) Elem ¶
func (c *CategoryList) Elem() CategoryList
func (*CategoryList) Encode ¶
func (s *CategoryList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CategoryList) GetName ¶
func (s *CategoryList) GetName() string
GetName returns the value of Name.
func (*CategoryList) MarshalJSON ¶
func (s *CategoryList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CategoryList) SetName ¶
func (s *CategoryList) SetName(val string)
SetName sets the value of Name.
func (*CategoryList) UnmarshalJSON ¶
func (s *CategoryList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CategoryPetsList ¶
type CategoryPetsList struct { ID int `json:"id"` Name string `json:"name"` Weight OptInt `json:"weight"` Birthday OptDateTime `json:"birthday"` }
Ref: #/components/schemas/Category_PetsList
func NewCategoryPetsList ¶
func NewCategoryPetsList(e *ent.Pet) *CategoryPetsList
func NewCategoryPetsLists ¶
func NewCategoryPetsLists(es []*ent.Pet) []CategoryPetsList
func (*CategoryPetsList) Decode ¶
func (s *CategoryPetsList) Decode(d *jx.Decoder) error
Decode decodes CategoryPetsList from json.
func (*CategoryPetsList) Elem ¶
func (pe *CategoryPetsList) Elem() CategoryPetsList
func (*CategoryPetsList) Encode ¶
func (s *CategoryPetsList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CategoryPetsList) GetBirthday ¶
func (s *CategoryPetsList) GetBirthday() OptDateTime
GetBirthday returns the value of Birthday.
func (*CategoryPetsList) GetID ¶
func (s *CategoryPetsList) GetID() int
GetID returns the value of ID.
func (*CategoryPetsList) GetName ¶
func (s *CategoryPetsList) GetName() string
GetName returns the value of Name.
func (*CategoryPetsList) GetWeight ¶
func (s *CategoryPetsList) GetWeight() OptInt
GetWeight returns the value of Weight.
func (*CategoryPetsList) MarshalJSON ¶
func (s *CategoryPetsList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CategoryPetsList) SetBirthday ¶
func (s *CategoryPetsList) SetBirthday(val OptDateTime)
SetBirthday sets the value of Birthday.
func (*CategoryPetsList) SetID ¶
func (s *CategoryPetsList) SetID(val int)
SetID sets the value of ID.
func (*CategoryPetsList) SetName ¶
func (s *CategoryPetsList) SetName(val string)
SetName sets the value of Name.
func (*CategoryPetsList) SetWeight ¶
func (s *CategoryPetsList) SetWeight(val OptInt)
SetWeight sets the value of Weight.
func (*CategoryPetsList) UnmarshalJSON ¶
func (s *CategoryPetsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CategoryRead ¶
Ref: #/components/schemas/CategoryRead
func NewCategoryRead ¶
func NewCategoryRead(e *ent.Category) *CategoryRead
func NewCategoryReads ¶
func NewCategoryReads(es []*ent.Category) []CategoryRead
func (*CategoryRead) Decode ¶
func (s *CategoryRead) Decode(d *jx.Decoder) error
Decode decodes CategoryRead from json.
func (*CategoryRead) Elem ¶
func (c *CategoryRead) Elem() CategoryRead
func (*CategoryRead) Encode ¶
func (s *CategoryRead) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CategoryRead) GetName ¶
func (s *CategoryRead) GetName() string
GetName returns the value of Name.
func (*CategoryRead) MarshalJSON ¶
func (s *CategoryRead) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CategoryRead) SetName ¶
func (s *CategoryRead) SetName(val string)
SetName sets the value of Name.
func (*CategoryRead) UnmarshalJSON ¶
func (s *CategoryRead) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CategoryUpdate ¶
Ref: #/components/schemas/CategoryUpdate
func NewCategoryUpdate ¶
func NewCategoryUpdate(e *ent.Category) *CategoryUpdate
func NewCategoryUpdates ¶
func NewCategoryUpdates(es []*ent.Category) []CategoryUpdate
func (*CategoryUpdate) Decode ¶
func (s *CategoryUpdate) Decode(d *jx.Decoder) error
Decode decodes CategoryUpdate from json.
func (*CategoryUpdate) Elem ¶
func (c *CategoryUpdate) Elem() CategoryUpdate
func (*CategoryUpdate) Encode ¶
func (s *CategoryUpdate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CategoryUpdate) GetName ¶
func (s *CategoryUpdate) GetName() string
GetName returns the value of Name.
func (*CategoryUpdate) MarshalJSON ¶
func (s *CategoryUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CategoryUpdate) SetName ¶
func (s *CategoryUpdate) SetName(val string)
SetName sets the value of Name.
func (*CategoryUpdate) UnmarshalJSON ¶
func (s *CategoryUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) CreateCategory ¶
func (c *Client) CreateCategory(ctx context.Context, request *CreateCategoryReq) (CreateCategoryRes, error)
CreateCategory invokes createCategory operation.
Creates a new Category and persists it to storage.
POST /categories
func (*Client) CreatePet ¶
func (c *Client) CreatePet(ctx context.Context, request *CreatePetReq) (CreatePetRes, error)
CreatePet invokes createPet operation.
Creates a new Pet and persists it to storage.
POST /pets
func (*Client) CreateUser ¶
func (c *Client) CreateUser(ctx context.Context, request *CreateUserReq) (CreateUserRes, error)
CreateUser invokes createUser operation.
Creates a new User and persists it to storage.
POST /users
func (*Client) DBHealth ¶
func (c *Client) DBHealth(ctx context.Context) (DBHealthRes, error)
DBHealth invokes DBHealth operation.
Ping the database and report.
GET /db-health
func (*Client) DeleteCategory ¶
func (c *Client) DeleteCategory(ctx context.Context, params DeleteCategoryParams) (DeleteCategoryRes, error)
DeleteCategory invokes deleteCategory operation.
Deletes the Category with the requested ID.
DELETE /categories/{id}
func (*Client) DeletePet ¶
func (c *Client) DeletePet(ctx context.Context, params DeletePetParams) (DeletePetRes, error)
DeletePet invokes deletePet operation.
Deletes the Pet with the requested ID.
DELETE /pets/{id}
func (*Client) DeleteUser ¶
func (c *Client) DeleteUser(ctx context.Context, params DeleteUserParams) (DeleteUserRes, error)
DeleteUser invokes deleteUser operation.
Deletes the User with the requested ID.
DELETE /users/{id}
func (*Client) ListCategory ¶
func (c *Client) ListCategory(ctx context.Context, params ListCategoryParams) (ListCategoryRes, error)
ListCategory invokes listCategory operation.
List Categories.
GET /categories
func (*Client) ListCategoryPets ¶
func (c *Client) ListCategoryPets(ctx context.Context, params ListCategoryPetsParams) (ListCategoryPetsRes, error)
ListCategoryPets invokes listCategoryPets operation.
List attached Pets.
GET /categories/{id}/pets
func (*Client) ListPet ¶
func (c *Client) ListPet(ctx context.Context, params ListPetParams) (ListPetRes, error)
ListPet invokes listPet operation.
List Pets.
GET /pets
func (*Client) ListPetCategories ¶
func (c *Client) ListPetCategories(ctx context.Context, params ListPetCategoriesParams) (ListPetCategoriesRes, error)
ListPetCategories invokes listPetCategories operation.
List attached Categories.
GET /pets/{id}/categories
func (*Client) ListPetFriends ¶
func (c *Client) ListPetFriends(ctx context.Context, params ListPetFriendsParams) (ListPetFriendsRes, error)
ListPetFriends invokes listPetFriends operation.
List attached Friends.
GET /pets/{id}/friends
func (*Client) ListUser ¶
func (c *Client) ListUser(ctx context.Context, params ListUserParams) (ListUserRes, error)
ListUser invokes listUser operation.
List Users.
GET /users
func (*Client) ListUserPets ¶
func (c *Client) ListUserPets(ctx context.Context, params ListUserPetsParams) (ListUserPetsRes, error)
ListUserPets invokes listUserPets operation.
List attached Pets.
GET /users/{id}/pets
func (*Client) ReadCategory ¶
func (c *Client) ReadCategory(ctx context.Context, params ReadCategoryParams) (ReadCategoryRes, error)
ReadCategory invokes readCategory operation.
Finds the Category with the requested ID and returns it.
GET /categories/{id}
func (*Client) ReadPet ¶
func (c *Client) ReadPet(ctx context.Context, params ReadPetParams) (ReadPetRes, error)
ReadPet invokes readPet operation.
Finds the Pet with the requested ID and returns it.
GET /pets/{id}
func (*Client) ReadPetOwner ¶
func (c *Client) ReadPetOwner(ctx context.Context, params ReadPetOwnerParams) (ReadPetOwnerRes, error)
ReadPetOwner invokes readPetOwner operation.
Find the attached User of the Pet with the given ID.
GET /pets/{id}/owner
func (*Client) ReadUser ¶
func (c *Client) ReadUser(ctx context.Context, params ReadUserParams) (ReadUserRes, error)
ReadUser invokes readUser operation.
Finds the User with the requested ID and returns it.
GET /users/{id}
func (*Client) UpdateCategory ¶
func (c *Client) UpdateCategory(ctx context.Context, request *UpdateCategoryReq, params UpdateCategoryParams) (UpdateCategoryRes, error)
UpdateCategory invokes updateCategory operation.
Updates a Category and persists changes to storage.
PATCH /categories/{id}
func (*Client) UpdatePet ¶
func (c *Client) UpdatePet(ctx context.Context, request *UpdatePetReq, params UpdatePetParams) (UpdatePetRes, error)
UpdatePet invokes updatePet operation.
Updates a Pet and persists changes to storage.
PATCH /pets/{id}
func (*Client) UpdateUser ¶
func (c *Client) UpdateUser(ctx context.Context, request *UpdateUserReq, params UpdateUserParams) (UpdateUserRes, error)
UpdateUser invokes updateUser operation.
Updates a User and persists changes to storage.
PATCH /users/{id}
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption is client config option.
func WithClient ¶
func WithClient(client ht.Client) ClientOption
WithClient specifies http client to use.
type CreateCategoryReq ¶
func (*CreateCategoryReq) Decode ¶
func (s *CreateCategoryReq) Decode(d *jx.Decoder) error
Decode decodes CreateCategoryReq from json.
func (*CreateCategoryReq) Encode ¶
func (s *CreateCategoryReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateCategoryReq) GetName ¶
func (s *CreateCategoryReq) GetName() string
GetName returns the value of Name.
func (*CreateCategoryReq) GetPets ¶
func (s *CreateCategoryReq) GetPets() []int
GetPets returns the value of Pets.
func (*CreateCategoryReq) MarshalJSON ¶
func (s *CreateCategoryReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateCategoryReq) SetName ¶
func (s *CreateCategoryReq) SetName(val string)
SetName sets the value of Name.
func (*CreateCategoryReq) SetPets ¶
func (s *CreateCategoryReq) SetPets(val []int)
SetPets sets the value of Pets.
func (*CreateCategoryReq) UnmarshalJSON ¶
func (s *CreateCategoryReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateCategoryRes ¶
type CreateCategoryRes interface {
// contains filtered or unexported methods
}
type CreatePetReq ¶
type CreatePetReq struct { Name string `json:"name"` Weight OptInt `json:"weight"` Birthday OptDateTime `json:"birthday"` Categories []int `json:"categories"` Owner int `json:"owner"` Friends []int `json:"friends"` }
func (*CreatePetReq) Decode ¶
func (s *CreatePetReq) Decode(d *jx.Decoder) error
Decode decodes CreatePetReq from json.
func (*CreatePetReq) Encode ¶
func (s *CreatePetReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreatePetReq) GetBirthday ¶
func (s *CreatePetReq) GetBirthday() OptDateTime
GetBirthday returns the value of Birthday.
func (*CreatePetReq) GetCategories ¶
func (s *CreatePetReq) GetCategories() []int
GetCategories returns the value of Categories.
func (*CreatePetReq) GetFriends ¶
func (s *CreatePetReq) GetFriends() []int
GetFriends returns the value of Friends.
func (*CreatePetReq) GetName ¶
func (s *CreatePetReq) GetName() string
GetName returns the value of Name.
func (*CreatePetReq) GetOwner ¶
func (s *CreatePetReq) GetOwner() int
GetOwner returns the value of Owner.
func (*CreatePetReq) GetWeight ¶
func (s *CreatePetReq) GetWeight() OptInt
GetWeight returns the value of Weight.
func (*CreatePetReq) MarshalJSON ¶
func (s *CreatePetReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreatePetReq) SetBirthday ¶
func (s *CreatePetReq) SetBirthday(val OptDateTime)
SetBirthday sets the value of Birthday.
func (*CreatePetReq) SetCategories ¶
func (s *CreatePetReq) SetCategories(val []int)
SetCategories sets the value of Categories.
func (*CreatePetReq) SetFriends ¶
func (s *CreatePetReq) SetFriends(val []int)
SetFriends sets the value of Friends.
func (*CreatePetReq) SetName ¶
func (s *CreatePetReq) SetName(val string)
SetName sets the value of Name.
func (*CreatePetReq) SetOwner ¶
func (s *CreatePetReq) SetOwner(val int)
SetOwner sets the value of Owner.
func (*CreatePetReq) SetWeight ¶
func (s *CreatePetReq) SetWeight(val OptInt)
SetWeight sets the value of Weight.
func (*CreatePetReq) UnmarshalJSON ¶
func (s *CreatePetReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreatePetRes ¶
type CreatePetRes interface {
// contains filtered or unexported methods
}
type CreateUserReq ¶
type CreateUserReq struct { Name string `json:"name"` Age int `json:"age"` Pets []int `json:"pets"` }
func (*CreateUserReq) Decode ¶
func (s *CreateUserReq) Decode(d *jx.Decoder) error
Decode decodes CreateUserReq from json.
func (*CreateUserReq) Encode ¶
func (s *CreateUserReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateUserReq) GetAge ¶
func (s *CreateUserReq) GetAge() int
GetAge returns the value of Age.
func (*CreateUserReq) GetName ¶
func (s *CreateUserReq) GetName() string
GetName returns the value of Name.
func (*CreateUserReq) GetPets ¶
func (s *CreateUserReq) GetPets() []int
GetPets returns the value of Pets.
func (*CreateUserReq) MarshalJSON ¶
func (s *CreateUserReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateUserReq) SetAge ¶
func (s *CreateUserReq) SetAge(val int)
SetAge sets the value of Age.
func (*CreateUserReq) SetName ¶
func (s *CreateUserReq) SetName(val string)
SetName sets the value of Name.
func (*CreateUserReq) SetPets ¶
func (s *CreateUserReq) SetPets(val []int)
SetPets sets the value of Pets.
func (*CreateUserReq) UnmarshalJSON ¶
func (s *CreateUserReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateUserRes ¶
type CreateUserRes interface {
// contains filtered or unexported methods
}
type DBHealthNoContent ¶
type DBHealthNoContent struct{}
DBHealthNoContent is response for DBHealth operation.
type DBHealthRes ¶
type DBHealthRes interface {
// contains filtered or unexported methods
}
type DBHealthServiceUnavailable ¶
type DBHealthServiceUnavailable struct{}
DBHealthServiceUnavailable is response for DBHealth operation.
type DeleteCategoryNoContent ¶
type DeleteCategoryNoContent struct{}
DeleteCategoryNoContent is response for DeleteCategory operation.
type DeleteCategoryParams ¶
type DeleteCategoryParams struct { // ID of the Category. ID int }
DeleteCategoryParams is parameters of deleteCategory operation.
type DeleteCategoryRes ¶
type DeleteCategoryRes interface {
// contains filtered or unexported methods
}
type DeletePetNoContent ¶
type DeletePetNoContent struct{}
DeletePetNoContent is response for DeletePet operation.
type DeletePetParams ¶
type DeletePetParams struct { // ID of the Pet. ID int }
DeletePetParams is parameters of deletePet operation.
type DeletePetRes ¶
type DeletePetRes interface {
// contains filtered or unexported methods
}
type DeleteUserNoContent ¶
type DeleteUserNoContent struct{}
DeleteUserNoContent is response for DeleteUser operation.
type DeleteUserParams ¶
type DeleteUserParams struct { // ID of the User. ID int }
DeleteUserParams is parameters of deleteUser operation.
type DeleteUserRes ¶
type DeleteUserRes interface {
// contains filtered or unexported methods
}
type Handler ¶
type Handler interface { // CreateCategory implements createCategory operation. // // Creates a new Category and persists it to storage. // // POST /categories CreateCategory(ctx context.Context, req *CreateCategoryReq) (CreateCategoryRes, error) // CreatePet implements createPet operation. // // Creates a new Pet and persists it to storage. // // POST /pets CreatePet(ctx context.Context, req *CreatePetReq) (CreatePetRes, error) // CreateUser implements createUser operation. // // Creates a new User and persists it to storage. // // POST /users CreateUser(ctx context.Context, req *CreateUserReq) (CreateUserRes, error) // DBHealth implements DBHealth operation. // // Ping the database and report. // // GET /db-health DBHealth(ctx context.Context) (DBHealthRes, error) // DeleteCategory implements deleteCategory operation. // // Deletes the Category with the requested ID. // // DELETE /categories/{id} DeleteCategory(ctx context.Context, params DeleteCategoryParams) (DeleteCategoryRes, error) // DeletePet implements deletePet operation. // // Deletes the Pet with the requested ID. // // DELETE /pets/{id} DeletePet(ctx context.Context, params DeletePetParams) (DeletePetRes, error) // DeleteUser implements deleteUser operation. // // Deletes the User with the requested ID. // // DELETE /users/{id} DeleteUser(ctx context.Context, params DeleteUserParams) (DeleteUserRes, error) // ListCategory implements listCategory operation. // // List Categories. // // GET /categories ListCategory(ctx context.Context, params ListCategoryParams) (ListCategoryRes, error) // ListCategoryPets implements listCategoryPets operation. // // List attached Pets. // // GET /categories/{id}/pets ListCategoryPets(ctx context.Context, params ListCategoryPetsParams) (ListCategoryPetsRes, error) // ListPet implements listPet operation. // // List Pets. // // GET /pets ListPet(ctx context.Context, params ListPetParams) (ListPetRes, error) // ListPetCategories implements listPetCategories operation. // // List attached Categories. // // GET /pets/{id}/categories ListPetCategories(ctx context.Context, params ListPetCategoriesParams) (ListPetCategoriesRes, error) // ListPetFriends implements listPetFriends operation. // // List attached Friends. // // GET /pets/{id}/friends ListPetFriends(ctx context.Context, params ListPetFriendsParams) (ListPetFriendsRes, error) // ListUser implements listUser operation. // // List Users. // // GET /users ListUser(ctx context.Context, params ListUserParams) (ListUserRes, error) // ListUserPets implements listUserPets operation. // // List attached Pets. // // GET /users/{id}/pets ListUserPets(ctx context.Context, params ListUserPetsParams) (ListUserPetsRes, error) // ReadCategory implements readCategory operation. // // Finds the Category with the requested ID and returns it. // // GET /categories/{id} ReadCategory(ctx context.Context, params ReadCategoryParams) (ReadCategoryRes, error) // ReadPet implements readPet operation. // // Finds the Pet with the requested ID and returns it. // // GET /pets/{id} ReadPet(ctx context.Context, params ReadPetParams) (ReadPetRes, error) // ReadPetOwner implements readPetOwner operation. // // Find the attached User of the Pet with the given ID. // // GET /pets/{id}/owner ReadPetOwner(ctx context.Context, params ReadPetOwnerParams) (ReadPetOwnerRes, error) // ReadUser implements readUser operation. // // Finds the User with the requested ID and returns it. // // GET /users/{id} ReadUser(ctx context.Context, params ReadUserParams) (ReadUserRes, error) // UpdateCategory implements updateCategory operation. // // Updates a Category and persists changes to storage. // // PATCH /categories/{id} UpdateCategory(ctx context.Context, req *UpdateCategoryReq, params UpdateCategoryParams) (UpdateCategoryRes, error) // UpdatePet implements updatePet operation. // // Updates a Pet and persists changes to storage. // // PATCH /pets/{id} UpdatePet(ctx context.Context, req *UpdatePetReq, params UpdatePetParams) (UpdatePetRes, error) // UpdateUser implements updateUser operation. // // Updates a User and persists changes to storage. // // PATCH /users/{id} UpdateUser(ctx context.Context, req *UpdateUserReq, params UpdateUserParams) (UpdateUserRes, error) }
Handler handles operations described by OpenAPI v3 specification.
type ListCategoryOKApplicationJSON ¶
type ListCategoryOKApplicationJSON []CategoryList
func (*ListCategoryOKApplicationJSON) Decode ¶
func (s *ListCategoryOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListCategoryOKApplicationJSON from json.
func (ListCategoryOKApplicationJSON) Encode ¶
func (s ListCategoryOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListCategoryOKApplicationJSON as json.
func (ListCategoryOKApplicationJSON) MarshalJSON ¶
func (s ListCategoryOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListCategoryOKApplicationJSON) UnmarshalJSON ¶
func (s *ListCategoryOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListCategoryOKApplicationJSON) Validate ¶
func (s ListCategoryOKApplicationJSON) Validate() error
type ListCategoryParams ¶
type ListCategoryParams struct { // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListCategoryParams is parameters of listCategory operation.
type ListCategoryPetsOKApplicationJSON ¶
type ListCategoryPetsOKApplicationJSON []CategoryPetsList
func (*ListCategoryPetsOKApplicationJSON) Decode ¶
func (s *ListCategoryPetsOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListCategoryPetsOKApplicationJSON from json.
func (ListCategoryPetsOKApplicationJSON) Encode ¶
func (s ListCategoryPetsOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListCategoryPetsOKApplicationJSON as json.
func (ListCategoryPetsOKApplicationJSON) MarshalJSON ¶
func (s ListCategoryPetsOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListCategoryPetsOKApplicationJSON) UnmarshalJSON ¶
func (s *ListCategoryPetsOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListCategoryPetsOKApplicationJSON) Validate ¶
func (s ListCategoryPetsOKApplicationJSON) Validate() error
type ListCategoryPetsParams ¶
type ListCategoryPetsParams struct { // ID of the Category. ID int // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListCategoryPetsParams is parameters of listCategoryPets operation.
type ListCategoryPetsRes ¶
type ListCategoryPetsRes interface {
// contains filtered or unexported methods
}
type ListCategoryRes ¶
type ListCategoryRes interface {
// contains filtered or unexported methods
}
type ListPetCategoriesOKApplicationJSON ¶
type ListPetCategoriesOKApplicationJSON []PetCategoriesList
func (*ListPetCategoriesOKApplicationJSON) Decode ¶
func (s *ListPetCategoriesOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListPetCategoriesOKApplicationJSON from json.
func (ListPetCategoriesOKApplicationJSON) Encode ¶
func (s ListPetCategoriesOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListPetCategoriesOKApplicationJSON as json.
func (ListPetCategoriesOKApplicationJSON) MarshalJSON ¶
func (s ListPetCategoriesOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListPetCategoriesOKApplicationJSON) UnmarshalJSON ¶
func (s *ListPetCategoriesOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListPetCategoriesOKApplicationJSON) Validate ¶
func (s ListPetCategoriesOKApplicationJSON) Validate() error
type ListPetCategoriesParams ¶
type ListPetCategoriesParams struct { // ID of the Pet. ID int // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListPetCategoriesParams is parameters of listPetCategories operation.
type ListPetCategoriesRes ¶
type ListPetCategoriesRes interface {
// contains filtered or unexported methods
}
type ListPetFriendsOKApplicationJSON ¶
type ListPetFriendsOKApplicationJSON []PetFriendsList
func (*ListPetFriendsOKApplicationJSON) Decode ¶
func (s *ListPetFriendsOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListPetFriendsOKApplicationJSON from json.
func (ListPetFriendsOKApplicationJSON) Encode ¶
func (s ListPetFriendsOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListPetFriendsOKApplicationJSON as json.
func (ListPetFriendsOKApplicationJSON) MarshalJSON ¶
func (s ListPetFriendsOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListPetFriendsOKApplicationJSON) UnmarshalJSON ¶
func (s *ListPetFriendsOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListPetFriendsOKApplicationJSON) Validate ¶
func (s ListPetFriendsOKApplicationJSON) Validate() error
type ListPetFriendsParams ¶
type ListPetFriendsParams struct { // ID of the Pet. ID int // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListPetFriendsParams is parameters of listPetFriends operation.
type ListPetFriendsRes ¶
type ListPetFriendsRes interface {
// contains filtered or unexported methods
}
type ListPetOKApplicationJSON ¶
type ListPetOKApplicationJSON []PetList
func (*ListPetOKApplicationJSON) Decode ¶
func (s *ListPetOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListPetOKApplicationJSON from json.
func (ListPetOKApplicationJSON) Encode ¶
func (s ListPetOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListPetOKApplicationJSON as json.
func (ListPetOKApplicationJSON) MarshalJSON ¶
func (s ListPetOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListPetOKApplicationJSON) UnmarshalJSON ¶
func (s *ListPetOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListPetOKApplicationJSON) Validate ¶
func (s ListPetOKApplicationJSON) Validate() error
type ListPetParams ¶
type ListPetParams struct { // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListPetParams is parameters of listPet operation.
type ListPetRes ¶
type ListPetRes interface {
// contains filtered or unexported methods
}
type ListUserOKApplicationJSON ¶
type ListUserOKApplicationJSON []UserList
func (*ListUserOKApplicationJSON) Decode ¶
func (s *ListUserOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListUserOKApplicationJSON from json.
func (ListUserOKApplicationJSON) Encode ¶
func (s ListUserOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListUserOKApplicationJSON as json.
func (ListUserOKApplicationJSON) MarshalJSON ¶
func (s ListUserOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListUserOKApplicationJSON) UnmarshalJSON ¶
func (s *ListUserOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListUserOKApplicationJSON) Validate ¶
func (s ListUserOKApplicationJSON) Validate() error
type ListUserParams ¶
type ListUserParams struct { // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListUserParams is parameters of listUser operation.
type ListUserPetsOKApplicationJSON ¶
type ListUserPetsOKApplicationJSON []UserPetsList
func (*ListUserPetsOKApplicationJSON) Decode ¶
func (s *ListUserPetsOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListUserPetsOKApplicationJSON from json.
func (ListUserPetsOKApplicationJSON) Encode ¶
func (s ListUserPetsOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListUserPetsOKApplicationJSON as json.
func (ListUserPetsOKApplicationJSON) MarshalJSON ¶
func (s ListUserPetsOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListUserPetsOKApplicationJSON) UnmarshalJSON ¶
func (s *ListUserPetsOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListUserPetsOKApplicationJSON) Validate ¶
func (s ListUserPetsOKApplicationJSON) Validate() error
type ListUserPetsParams ¶
type ListUserPetsParams struct { // ID of the User. ID int // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListUserPetsParams is parameters of listUserPets operation.
type ListUserPetsRes ¶
type ListUserPetsRes interface {
// contains filtered or unexported methods
}
type ListUserRes ¶
type ListUserRes interface {
// contains filtered or unexported methods
}
type OgentHandler ¶
type OgentHandler struct {
// contains filtered or unexported fields
}
OgentHandler implements the ogen generated Handler interface and uses Ent as data layer.
func NewOgentHandler ¶
func NewOgentHandler(c *ent.Client) *OgentHandler
NewOgentHandler returns a new OgentHandler.
func (*OgentHandler) CreateCategory ¶
func (h *OgentHandler) CreateCategory(ctx context.Context, req *CreateCategoryReq) (CreateCategoryRes, error)
CreateCategory handles POST /categories requests.
func (*OgentHandler) CreatePet ¶
func (h *OgentHandler) CreatePet(ctx context.Context, req *CreatePetReq) (CreatePetRes, error)
CreatePet handles POST /pets requests.
func (*OgentHandler) CreateUser ¶
func (h *OgentHandler) CreateUser(ctx context.Context, req *CreateUserReq) (CreateUserRes, error)
CreateUser handles POST /users requests.
func (*OgentHandler) DeleteCategory ¶
func (h *OgentHandler) DeleteCategory(ctx context.Context, params DeleteCategoryParams) (DeleteCategoryRes, error)
DeleteCategory handles DELETE /categories/{id} requests.
func (*OgentHandler) DeletePet ¶
func (h *OgentHandler) DeletePet(ctx context.Context, params DeletePetParams) (DeletePetRes, error)
DeletePet handles DELETE /pets/{id} requests.
func (*OgentHandler) DeleteUser ¶
func (h *OgentHandler) DeleteUser(ctx context.Context, params DeleteUserParams) (DeleteUserRes, error)
DeleteUser handles DELETE /users/{id} requests.
func (*OgentHandler) ListCategory ¶
func (h *OgentHandler) ListCategory(ctx context.Context, params ListCategoryParams) (ListCategoryRes, error)
ListCategory handles GET /categories requests.
func (*OgentHandler) ListCategoryPets ¶
func (h *OgentHandler) ListCategoryPets(ctx context.Context, params ListCategoryPetsParams) (ListCategoryPetsRes, error)
ListCategoryPets handles GET /categories/{id}/pets requests.
func (*OgentHandler) ListPet ¶
func (h *OgentHandler) ListPet(ctx context.Context, params ListPetParams) (ListPetRes, error)
ListPet handles GET /pets requests.
func (*OgentHandler) ListPetCategories ¶
func (h *OgentHandler) ListPetCategories(ctx context.Context, params ListPetCategoriesParams) (ListPetCategoriesRes, error)
ListPetCategories handles GET /pets/{id}/categories requests.
func (*OgentHandler) ListPetFriends ¶
func (h *OgentHandler) ListPetFriends(ctx context.Context, params ListPetFriendsParams) (ListPetFriendsRes, error)
ListPetFriends handles GET /pets/{id}/friends requests.
func (*OgentHandler) ListUser ¶
func (h *OgentHandler) ListUser(ctx context.Context, params ListUserParams) (ListUserRes, error)
ListUser handles GET /users requests.
func (*OgentHandler) ListUserPets ¶
func (h *OgentHandler) ListUserPets(ctx context.Context, params ListUserPetsParams) (ListUserPetsRes, error)
ListUserPets handles GET /users/{id}/pets requests.
func (*OgentHandler) ReadCategory ¶
func (h *OgentHandler) ReadCategory(ctx context.Context, params ReadCategoryParams) (ReadCategoryRes, error)
ReadCategory handles GET /categories/{id} requests.
func (*OgentHandler) ReadPet ¶
func (h *OgentHandler) ReadPet(ctx context.Context, params ReadPetParams) (ReadPetRes, error)
ReadPet handles GET /pets/{id} requests.
func (*OgentHandler) ReadPetOwner ¶
func (h *OgentHandler) ReadPetOwner(ctx context.Context, params ReadPetOwnerParams) (ReadPetOwnerRes, error)
ReadPetOwner handles GET /pets/{id}/owner requests.
func (*OgentHandler) ReadUser ¶
func (h *OgentHandler) ReadUser(ctx context.Context, params ReadUserParams) (ReadUserRes, error)
ReadUser handles GET /users/{id} requests.
func (*OgentHandler) UpdateCategory ¶
func (h *OgentHandler) UpdateCategory(ctx context.Context, req *UpdateCategoryReq, params UpdateCategoryParams) (UpdateCategoryRes, error)
UpdateCategory handles PATCH /categories/{id} requests.
func (*OgentHandler) UpdatePet ¶
func (h *OgentHandler) UpdatePet(ctx context.Context, req *UpdatePetReq, params UpdatePetParams) (UpdatePetRes, error)
UpdatePet handles PATCH /pets/{id} requests.
func (*OgentHandler) UpdateUser ¶
func (h *OgentHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, params UpdateUserParams) (UpdateUserRes, error)
UpdateUser handles PATCH /users/{id} requests.
type OptDateTime ¶
OptDateTime is optional time.Time.
func NewOptDateTime ¶
func NewOptDateTime(v time.Time) OptDateTime
NewOptDateTime returns new OptDateTime with value set to v.
func (OptDateTime) Get ¶
func (o OptDateTime) Get() (v time.Time, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptDateTime) IsSet ¶
func (o OptDateTime) IsSet() bool
IsSet returns true if OptDateTime was set.
func (OptDateTime) MarshalJSON ¶
func (s OptDateTime) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptDateTime) Or ¶
func (o OptDateTime) Or(d time.Time) time.Time
Or returns value if set, or given parameter if does not.
func (*OptDateTime) UnmarshalJSON ¶
func (s *OptDateTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptInt ¶
OptInt is optional int.
func (OptInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface { ServerOption ClientOption }
Option is config option.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the metric.NewNoopMeterProvider is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type PetCategoriesList ¶
Ref: #/components/schemas/Pet_CategoriesList
func NewPetCategoriesList ¶
func NewPetCategoriesList(e *ent.Category) *PetCategoriesList
func NewPetCategoriesLists ¶
func NewPetCategoriesLists(es []*ent.Category) []PetCategoriesList
func (*PetCategoriesList) Decode ¶
func (s *PetCategoriesList) Decode(d *jx.Decoder) error
Decode decodes PetCategoriesList from json.
func (*PetCategoriesList) Elem ¶
func (c *PetCategoriesList) Elem() PetCategoriesList
func (*PetCategoriesList) Encode ¶
func (s *PetCategoriesList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PetCategoriesList) GetID ¶
func (s *PetCategoriesList) GetID() int
GetID returns the value of ID.
func (*PetCategoriesList) GetName ¶
func (s *PetCategoriesList) GetName() string
GetName returns the value of Name.
func (*PetCategoriesList) MarshalJSON ¶
func (s *PetCategoriesList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PetCategoriesList) SetID ¶
func (s *PetCategoriesList) SetID(val int)
SetID sets the value of ID.
func (*PetCategoriesList) SetName ¶
func (s *PetCategoriesList) SetName(val string)
SetName sets the value of Name.
func (*PetCategoriesList) UnmarshalJSON ¶
func (s *PetCategoriesList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type PetCreate ¶
type PetCreate struct { ID int `json:"id"` Name string `json:"name"` Weight OptInt `json:"weight"` Birthday OptDateTime `json:"birthday"` Categories []PetCreateCategories `json:"categories"` Owner PetCreateOwner `json:"owner"` }
Ref: #/components/schemas/PetCreate
func NewPetCreate ¶
func NewPetCreates ¶
func (*PetCreate) GetBirthday ¶
func (s *PetCreate) GetBirthday() OptDateTime
GetBirthday returns the value of Birthday.
func (*PetCreate) GetCategories ¶
func (s *PetCreate) GetCategories() []PetCreateCategories
GetCategories returns the value of Categories.
func (*PetCreate) GetOwner ¶
func (s *PetCreate) GetOwner() PetCreateOwner
GetOwner returns the value of Owner.
func (*PetCreate) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*PetCreate) SetBirthday ¶
func (s *PetCreate) SetBirthday(val OptDateTime)
SetBirthday sets the value of Birthday.
func (*PetCreate) SetCategories ¶
func (s *PetCreate) SetCategories(val []PetCreateCategories)
SetCategories sets the value of Categories.
func (*PetCreate) SetOwner ¶
func (s *PetCreate) SetOwner(val PetCreateOwner)
SetOwner sets the value of Owner.
func (*PetCreate) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type PetCreateCategories ¶
Ref: #/components/schemas/PetCreate_Categories
func NewPetCreateCategories ¶
func NewPetCreateCategories(e *ent.Category) *PetCreateCategories
func NewPetCreateCategoriesSlice ¶
func NewPetCreateCategoriesSlice(es []*ent.Category) []PetCreateCategories
func (*PetCreateCategories) Decode ¶
func (s *PetCreateCategories) Decode(d *jx.Decoder) error
Decode decodes PetCreateCategories from json.
func (*PetCreateCategories) Elem ¶
func (c *PetCreateCategories) Elem() PetCreateCategories
func (*PetCreateCategories) Encode ¶
func (s *PetCreateCategories) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PetCreateCategories) GetID ¶
func (s *PetCreateCategories) GetID() int
GetID returns the value of ID.
func (*PetCreateCategories) GetName ¶
func (s *PetCreateCategories) GetName() string
GetName returns the value of Name.
func (*PetCreateCategories) MarshalJSON ¶
func (s *PetCreateCategories) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PetCreateCategories) SetID ¶
func (s *PetCreateCategories) SetID(val int)
SetID sets the value of ID.
func (*PetCreateCategories) SetName ¶
func (s *PetCreateCategories) SetName(val string)
SetName sets the value of Name.
func (*PetCreateCategories) UnmarshalJSON ¶
func (s *PetCreateCategories) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type PetCreateOwner ¶
Ref: #/components/schemas/PetCreate_Owner
func NewPetCreateOwner ¶
func NewPetCreateOwner(e *ent.User) *PetCreateOwner
func NewPetCreateOwners ¶
func NewPetCreateOwners(es []*ent.User) []PetCreateOwner
func (*PetCreateOwner) Decode ¶
func (s *PetCreateOwner) Decode(d *jx.Decoder) error
Decode decodes PetCreateOwner from json.
func (*PetCreateOwner) Elem ¶
func (u *PetCreateOwner) Elem() PetCreateOwner
func (*PetCreateOwner) Encode ¶
func (s *PetCreateOwner) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PetCreateOwner) GetAge ¶
func (s *PetCreateOwner) GetAge() int
GetAge returns the value of Age.
func (*PetCreateOwner) GetName ¶
func (s *PetCreateOwner) GetName() string
GetName returns the value of Name.
func (*PetCreateOwner) MarshalJSON ¶
func (s *PetCreateOwner) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PetCreateOwner) SetAge ¶
func (s *PetCreateOwner) SetAge(val int)
SetAge sets the value of Age.
func (*PetCreateOwner) SetName ¶
func (s *PetCreateOwner) SetName(val string)
SetName sets the value of Name.
func (*PetCreateOwner) UnmarshalJSON ¶
func (s *PetCreateOwner) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type PetFriendsList ¶
type PetFriendsList struct { ID int `json:"id"` Name string `json:"name"` Weight OptInt `json:"weight"` Birthday OptDateTime `json:"birthday"` }
Ref: #/components/schemas/Pet_FriendsList
func NewPetFriendsList ¶
func NewPetFriendsList(e *ent.Pet) *PetFriendsList
func NewPetFriendsLists ¶
func NewPetFriendsLists(es []*ent.Pet) []PetFriendsList
func (*PetFriendsList) Decode ¶
func (s *PetFriendsList) Decode(d *jx.Decoder) error
Decode decodes PetFriendsList from json.
func (*PetFriendsList) Elem ¶
func (pe *PetFriendsList) Elem() PetFriendsList
func (*PetFriendsList) Encode ¶
func (s *PetFriendsList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PetFriendsList) GetBirthday ¶
func (s *PetFriendsList) GetBirthday() OptDateTime
GetBirthday returns the value of Birthday.
func (*PetFriendsList) GetName ¶
func (s *PetFriendsList) GetName() string
GetName returns the value of Name.
func (*PetFriendsList) GetWeight ¶
func (s *PetFriendsList) GetWeight() OptInt
GetWeight returns the value of Weight.
func (*PetFriendsList) MarshalJSON ¶
func (s *PetFriendsList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PetFriendsList) SetBirthday ¶
func (s *PetFriendsList) SetBirthday(val OptDateTime)
SetBirthday sets the value of Birthday.
func (*PetFriendsList) SetName ¶
func (s *PetFriendsList) SetName(val string)
SetName sets the value of Name.
func (*PetFriendsList) SetWeight ¶
func (s *PetFriendsList) SetWeight(val OptInt)
SetWeight sets the value of Weight.
func (*PetFriendsList) UnmarshalJSON ¶
func (s *PetFriendsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type PetList ¶
type PetList struct { ID int `json:"id"` Name string `json:"name"` Weight OptInt `json:"weight"` Birthday OptDateTime `json:"birthday"` }
Ref: #/components/schemas/PetList
func NewPetList ¶
func NewPetLists ¶
func (*PetList) GetBirthday ¶
func (s *PetList) GetBirthday() OptDateTime
GetBirthday returns the value of Birthday.
func (*PetList) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*PetList) SetBirthday ¶
func (s *PetList) SetBirthday(val OptDateTime)
SetBirthday sets the value of Birthday.
func (*PetList) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type PetOwnerRead ¶
Ref: #/components/schemas/Pet_OwnerRead
func NewPetOwnerRead ¶
func NewPetOwnerRead(e *ent.User) *PetOwnerRead
func NewPetOwnerReads ¶
func NewPetOwnerReads(es []*ent.User) []PetOwnerRead
func (*PetOwnerRead) Decode ¶
func (s *PetOwnerRead) Decode(d *jx.Decoder) error
Decode decodes PetOwnerRead from json.
func (*PetOwnerRead) Elem ¶
func (u *PetOwnerRead) Elem() PetOwnerRead
func (*PetOwnerRead) Encode ¶
func (s *PetOwnerRead) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PetOwnerRead) GetName ¶
func (s *PetOwnerRead) GetName() string
GetName returns the value of Name.
func (*PetOwnerRead) MarshalJSON ¶
func (s *PetOwnerRead) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PetOwnerRead) SetName ¶
func (s *PetOwnerRead) SetName(val string)
SetName sets the value of Name.
func (*PetOwnerRead) UnmarshalJSON ¶
func (s *PetOwnerRead) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type PetRead ¶
type PetRead struct { ID int `json:"id"` Name string `json:"name"` Weight OptInt `json:"weight"` Birthday OptDateTime `json:"birthday"` }
Ref: #/components/schemas/PetRead
func NewPetRead ¶
func NewPetReads ¶
func (*PetRead) GetBirthday ¶
func (s *PetRead) GetBirthday() OptDateTime
GetBirthday returns the value of Birthday.
func (*PetRead) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*PetRead) SetBirthday ¶
func (s *PetRead) SetBirthday(val OptDateTime)
SetBirthday sets the value of Birthday.
func (*PetRead) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type PetUpdate ¶
type PetUpdate struct { ID int `json:"id"` Name string `json:"name"` Weight OptInt `json:"weight"` Birthday OptDateTime `json:"birthday"` }
Ref: #/components/schemas/PetUpdate
func NewPetUpdate ¶
func NewPetUpdates ¶
func (*PetUpdate) GetBirthday ¶
func (s *PetUpdate) GetBirthday() OptDateTime
GetBirthday returns the value of Birthday.
func (*PetUpdate) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*PetUpdate) SetBirthday ¶
func (s *PetUpdate) SetBirthday(val OptDateTime)
SetBirthday sets the value of Birthday.
func (*PetUpdate) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type R400 ¶
type R400 struct { Code int `json:"code"` Status string `json:"status"` Errors jx.Raw `json:"errors"` }
func (*R400) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*R400) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type R404 ¶
type R404 struct { Code int `json:"code"` Status string `json:"status"` Errors jx.Raw `json:"errors"` }
func (*R404) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*R404) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type R409 ¶
type R409 struct { Code int `json:"code"` Status string `json:"status"` Errors jx.Raw `json:"errors"` }
func (*R409) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*R409) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type R500 ¶
type R500 struct { Code int `json:"code"` Status string `json:"status"` Errors jx.Raw `json:"errors"` }
func (*R500) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*R500) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ReadCategoryParams ¶
type ReadCategoryParams struct { // ID of the Category. ID int }
ReadCategoryParams is parameters of readCategory operation.
type ReadCategoryRes ¶
type ReadCategoryRes interface {
// contains filtered or unexported methods
}
type ReadPetOwnerParams ¶
type ReadPetOwnerParams struct { // ID of the Pet. ID int }
ReadPetOwnerParams is parameters of readPetOwner operation.
type ReadPetOwnerRes ¶
type ReadPetOwnerRes interface {
// contains filtered or unexported methods
}
type ReadPetParams ¶
type ReadPetParams struct { // ID of the Pet. ID int }
ReadPetParams is parameters of readPet operation.
type ReadPetRes ¶
type ReadPetRes interface {
// contains filtered or unexported methods
}
type ReadUserParams ¶
type ReadUserParams struct { // ID of the User. ID int }
ReadUserParams is parameters of readUser operation.
type ReadUserRes ¶
type ReadUserRes interface {
// contains filtered or unexported methods
}
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) CreateCategory ¶
func (UnimplementedHandler) CreateCategory(ctx context.Context, req *CreateCategoryReq) (r CreateCategoryRes, _ error)
CreateCategory implements createCategory operation.
Creates a new Category and persists it to storage.
POST /categories
func (UnimplementedHandler) CreatePet ¶
func (UnimplementedHandler) CreatePet(ctx context.Context, req *CreatePetReq) (r CreatePetRes, _ error)
CreatePet implements createPet operation.
Creates a new Pet and persists it to storage.
POST /pets
func (UnimplementedHandler) CreateUser ¶
func (UnimplementedHandler) CreateUser(ctx context.Context, req *CreateUserReq) (r CreateUserRes, _ error)
CreateUser implements createUser operation.
Creates a new User and persists it to storage.
POST /users
func (UnimplementedHandler) DBHealth ¶
func (UnimplementedHandler) DBHealth(ctx context.Context) (r DBHealthRes, _ error)
DBHealth implements DBHealth operation.
Ping the database and report.
GET /db-health
func (UnimplementedHandler) DeleteCategory ¶
func (UnimplementedHandler) DeleteCategory(ctx context.Context, params DeleteCategoryParams) (r DeleteCategoryRes, _ error)
DeleteCategory implements deleteCategory operation.
Deletes the Category with the requested ID.
DELETE /categories/{id}
func (UnimplementedHandler) DeletePet ¶
func (UnimplementedHandler) DeletePet(ctx context.Context, params DeletePetParams) (r DeletePetRes, _ error)
DeletePet implements deletePet operation.
Deletes the Pet with the requested ID.
DELETE /pets/{id}
func (UnimplementedHandler) DeleteUser ¶
func (UnimplementedHandler) DeleteUser(ctx context.Context, params DeleteUserParams) (r DeleteUserRes, _ error)
DeleteUser implements deleteUser operation.
Deletes the User with the requested ID.
DELETE /users/{id}
func (UnimplementedHandler) ListCategory ¶
func (UnimplementedHandler) ListCategory(ctx context.Context, params ListCategoryParams) (r ListCategoryRes, _ error)
ListCategory implements listCategory operation.
List Categories.
GET /categories
func (UnimplementedHandler) ListCategoryPets ¶
func (UnimplementedHandler) ListCategoryPets(ctx context.Context, params ListCategoryPetsParams) (r ListCategoryPetsRes, _ error)
ListCategoryPets implements listCategoryPets operation.
List attached Pets.
GET /categories/{id}/pets
func (UnimplementedHandler) ListPet ¶
func (UnimplementedHandler) ListPet(ctx context.Context, params ListPetParams) (r ListPetRes, _ error)
ListPet implements listPet operation.
List Pets.
GET /pets
func (UnimplementedHandler) ListPetCategories ¶
func (UnimplementedHandler) ListPetCategories(ctx context.Context, params ListPetCategoriesParams) (r ListPetCategoriesRes, _ error)
ListPetCategories implements listPetCategories operation.
List attached Categories.
GET /pets/{id}/categories
func (UnimplementedHandler) ListPetFriends ¶
func (UnimplementedHandler) ListPetFriends(ctx context.Context, params ListPetFriendsParams) (r ListPetFriendsRes, _ error)
ListPetFriends implements listPetFriends operation.
List attached Friends.
GET /pets/{id}/friends
func (UnimplementedHandler) ListUser ¶
func (UnimplementedHandler) ListUser(ctx context.Context, params ListUserParams) (r ListUserRes, _ error)
ListUser implements listUser operation.
List Users.
GET /users
func (UnimplementedHandler) ListUserPets ¶
func (UnimplementedHandler) ListUserPets(ctx context.Context, params ListUserPetsParams) (r ListUserPetsRes, _ error)
ListUserPets implements listUserPets operation.
List attached Pets.
GET /users/{id}/pets
func (UnimplementedHandler) ReadCategory ¶
func (UnimplementedHandler) ReadCategory(ctx context.Context, params ReadCategoryParams) (r ReadCategoryRes, _ error)
ReadCategory implements readCategory operation.
Finds the Category with the requested ID and returns it.
GET /categories/{id}
func (UnimplementedHandler) ReadPet ¶
func (UnimplementedHandler) ReadPet(ctx context.Context, params ReadPetParams) (r ReadPetRes, _ error)
ReadPet implements readPet operation.
Finds the Pet with the requested ID and returns it.
GET /pets/{id}
func (UnimplementedHandler) ReadPetOwner ¶
func (UnimplementedHandler) ReadPetOwner(ctx context.Context, params ReadPetOwnerParams) (r ReadPetOwnerRes, _ error)
ReadPetOwner implements readPetOwner operation.
Find the attached User of the Pet with the given ID.
GET /pets/{id}/owner
func (UnimplementedHandler) ReadUser ¶
func (UnimplementedHandler) ReadUser(ctx context.Context, params ReadUserParams) (r ReadUserRes, _ error)
ReadUser implements readUser operation.
Finds the User with the requested ID and returns it.
GET /users/{id}
func (UnimplementedHandler) UpdateCategory ¶
func (UnimplementedHandler) UpdateCategory(ctx context.Context, req *UpdateCategoryReq, params UpdateCategoryParams) (r UpdateCategoryRes, _ error)
UpdateCategory implements updateCategory operation.
Updates a Category and persists changes to storage.
PATCH /categories/{id}
func (UnimplementedHandler) UpdatePet ¶
func (UnimplementedHandler) UpdatePet(ctx context.Context, req *UpdatePetReq, params UpdatePetParams) (r UpdatePetRes, _ error)
UpdatePet implements updatePet operation.
Updates a Pet and persists changes to storage.
PATCH /pets/{id}
func (UnimplementedHandler) UpdateUser ¶
func (UnimplementedHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, params UpdateUserParams) (r UpdateUserRes, _ error)
UpdateUser implements updateUser operation.
Updates a User and persists changes to storage.
PATCH /users/{id}
type UpdateCategoryParams ¶
type UpdateCategoryParams struct { // ID of the Category. ID int }
UpdateCategoryParams is parameters of updateCategory operation.
type UpdateCategoryReq ¶
func (*UpdateCategoryReq) Decode ¶
func (s *UpdateCategoryReq) Decode(d *jx.Decoder) error
Decode decodes UpdateCategoryReq from json.
func (*UpdateCategoryReq) Encode ¶
func (s *UpdateCategoryReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UpdateCategoryReq) GetName ¶
func (s *UpdateCategoryReq) GetName() OptString
GetName returns the value of Name.
func (*UpdateCategoryReq) GetPets ¶
func (s *UpdateCategoryReq) GetPets() []int
GetPets returns the value of Pets.
func (*UpdateCategoryReq) MarshalJSON ¶
func (s *UpdateCategoryReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateCategoryReq) SetName ¶
func (s *UpdateCategoryReq) SetName(val OptString)
SetName sets the value of Name.
func (*UpdateCategoryReq) SetPets ¶
func (s *UpdateCategoryReq) SetPets(val []int)
SetPets sets the value of Pets.
func (*UpdateCategoryReq) UnmarshalJSON ¶
func (s *UpdateCategoryReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateCategoryRes ¶
type UpdateCategoryRes interface {
// contains filtered or unexported methods
}
type UpdatePetParams ¶
type UpdatePetParams struct { // ID of the Pet. ID int }
UpdatePetParams is parameters of updatePet operation.
type UpdatePetReq ¶
type UpdatePetReq struct { Name OptString `json:"name"` Weight OptInt `json:"weight"` Birthday OptDateTime `json:"birthday"` Categories []int `json:"categories"` Owner OptInt `json:"owner"` Friends []int `json:"friends"` }
func (*UpdatePetReq) Decode ¶
func (s *UpdatePetReq) Decode(d *jx.Decoder) error
Decode decodes UpdatePetReq from json.
func (*UpdatePetReq) Encode ¶
func (s *UpdatePetReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UpdatePetReq) GetBirthday ¶
func (s *UpdatePetReq) GetBirthday() OptDateTime
GetBirthday returns the value of Birthday.
func (*UpdatePetReq) GetCategories ¶
func (s *UpdatePetReq) GetCategories() []int
GetCategories returns the value of Categories.
func (*UpdatePetReq) GetFriends ¶
func (s *UpdatePetReq) GetFriends() []int
GetFriends returns the value of Friends.
func (*UpdatePetReq) GetName ¶
func (s *UpdatePetReq) GetName() OptString
GetName returns the value of Name.
func (*UpdatePetReq) GetOwner ¶
func (s *UpdatePetReq) GetOwner() OptInt
GetOwner returns the value of Owner.
func (*UpdatePetReq) GetWeight ¶
func (s *UpdatePetReq) GetWeight() OptInt
GetWeight returns the value of Weight.
func (*UpdatePetReq) MarshalJSON ¶
func (s *UpdatePetReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdatePetReq) SetBirthday ¶
func (s *UpdatePetReq) SetBirthday(val OptDateTime)
SetBirthday sets the value of Birthday.
func (*UpdatePetReq) SetCategories ¶
func (s *UpdatePetReq) SetCategories(val []int)
SetCategories sets the value of Categories.
func (*UpdatePetReq) SetFriends ¶
func (s *UpdatePetReq) SetFriends(val []int)
SetFriends sets the value of Friends.
func (*UpdatePetReq) SetName ¶
func (s *UpdatePetReq) SetName(val OptString)
SetName sets the value of Name.
func (*UpdatePetReq) SetOwner ¶
func (s *UpdatePetReq) SetOwner(val OptInt)
SetOwner sets the value of Owner.
func (*UpdatePetReq) SetWeight ¶
func (s *UpdatePetReq) SetWeight(val OptInt)
SetWeight sets the value of Weight.
func (*UpdatePetReq) UnmarshalJSON ¶
func (s *UpdatePetReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdatePetRes ¶
type UpdatePetRes interface {
// contains filtered or unexported methods
}
type UpdateUserParams ¶
type UpdateUserParams struct { // ID of the User. ID int }
UpdateUserParams is parameters of updateUser operation.
type UpdateUserReq ¶
type UpdateUserReq struct { Name OptString `json:"name"` Age OptInt `json:"age"` Pets []int `json:"pets"` }
func (*UpdateUserReq) Decode ¶
func (s *UpdateUserReq) Decode(d *jx.Decoder) error
Decode decodes UpdateUserReq from json.
func (*UpdateUserReq) Encode ¶
func (s *UpdateUserReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UpdateUserReq) GetAge ¶
func (s *UpdateUserReq) GetAge() OptInt
GetAge returns the value of Age.
func (*UpdateUserReq) GetName ¶
func (s *UpdateUserReq) GetName() OptString
GetName returns the value of Name.
func (*UpdateUserReq) GetPets ¶
func (s *UpdateUserReq) GetPets() []int
GetPets returns the value of Pets.
func (*UpdateUserReq) MarshalJSON ¶
func (s *UpdateUserReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateUserReq) SetAge ¶
func (s *UpdateUserReq) SetAge(val OptInt)
SetAge sets the value of Age.
func (*UpdateUserReq) SetName ¶
func (s *UpdateUserReq) SetName(val OptString)
SetName sets the value of Name.
func (*UpdateUserReq) SetPets ¶
func (s *UpdateUserReq) SetPets(val []int)
SetPets sets the value of Pets.
func (*UpdateUserReq) UnmarshalJSON ¶
func (s *UpdateUserReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateUserRes ¶
type UpdateUserRes interface {
// contains filtered or unexported methods
}
type UserCreate ¶
Ref: #/components/schemas/UserCreate
func NewUserCreate ¶
func NewUserCreate(e *ent.User) *UserCreate
func NewUserCreates ¶
func NewUserCreates(es []*ent.User) []UserCreate
func (*UserCreate) Decode ¶
func (s *UserCreate) Decode(d *jx.Decoder) error
Decode decodes UserCreate from json.
func (*UserCreate) Elem ¶
func (u *UserCreate) Elem() UserCreate
func (*UserCreate) Encode ¶
func (s *UserCreate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UserCreate) GetName ¶
func (s *UserCreate) GetName() string
GetName returns the value of Name.
func (*UserCreate) MarshalJSON ¶
func (s *UserCreate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UserCreate) SetName ¶
func (s *UserCreate) SetName(val string)
SetName sets the value of Name.
func (*UserCreate) UnmarshalJSON ¶
func (s *UserCreate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UserList ¶
Ref: #/components/schemas/UserList
func NewUserList ¶
func NewUserLists ¶
func (*UserList) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*UserList) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type UserPetsList ¶
type UserPetsList struct { ID int `json:"id"` Name string `json:"name"` Weight OptInt `json:"weight"` Birthday OptDateTime `json:"birthday"` }
Ref: #/components/schemas/User_PetsList
func NewUserPetsList ¶
func NewUserPetsList(e *ent.Pet) *UserPetsList
func NewUserPetsLists ¶
func NewUserPetsLists(es []*ent.Pet) []UserPetsList
func (*UserPetsList) Decode ¶
func (s *UserPetsList) Decode(d *jx.Decoder) error
Decode decodes UserPetsList from json.
func (*UserPetsList) Elem ¶
func (pe *UserPetsList) Elem() UserPetsList
func (*UserPetsList) Encode ¶
func (s *UserPetsList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UserPetsList) GetBirthday ¶
func (s *UserPetsList) GetBirthday() OptDateTime
GetBirthday returns the value of Birthday.
func (*UserPetsList) GetName ¶
func (s *UserPetsList) GetName() string
GetName returns the value of Name.
func (*UserPetsList) GetWeight ¶
func (s *UserPetsList) GetWeight() OptInt
GetWeight returns the value of Weight.
func (*UserPetsList) MarshalJSON ¶
func (s *UserPetsList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UserPetsList) SetBirthday ¶
func (s *UserPetsList) SetBirthday(val OptDateTime)
SetBirthday sets the value of Birthday.
func (*UserPetsList) SetName ¶
func (s *UserPetsList) SetName(val string)
SetName sets the value of Name.
func (*UserPetsList) SetWeight ¶
func (s *UserPetsList) SetWeight(val OptInt)
SetWeight sets the value of Weight.
func (*UserPetsList) UnmarshalJSON ¶
func (s *UserPetsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UserRead ¶
Ref: #/components/schemas/UserRead
func NewUserRead ¶
func NewUserReads ¶
func (*UserRead) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*UserRead) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type UserUpdate ¶
Ref: #/components/schemas/UserUpdate
func NewUserUpdate ¶
func NewUserUpdate(e *ent.User) *UserUpdate
func NewUserUpdates ¶
func NewUserUpdates(es []*ent.User) []UserUpdate
func (*UserUpdate) Decode ¶
func (s *UserUpdate) Decode(d *jx.Decoder) error
Decode decodes UserUpdate from json.
func (*UserUpdate) Elem ¶
func (u *UserUpdate) Elem() UserUpdate
func (*UserUpdate) Encode ¶
func (s *UserUpdate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UserUpdate) GetName ¶
func (s *UserUpdate) GetName() string
GetName returns the value of Name.
func (*UserUpdate) MarshalJSON ¶
func (s *UserUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UserUpdate) SetName ¶
func (s *UserUpdate) SetName(val string)
SetName sets the value of Name.
func (*UserUpdate) UnmarshalJSON ¶
func (s *UserUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
Source Files ¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_middleware_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go
- ogent.go
- responses.go