ogen

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type Breed

type Breed struct {
	CreateTime  time.Time   `json:"create_time"`
	DeletedTime OptDateTime `json:"deleted_time"`
	Edges       BreedEdges  `json:"edges"`
	ID          uuid.UUID   `json:"id"`
	Name        string      `json:"name"`
	UpdateTime  time.Time   `json:"update_time"`
}

Ref: #/components/schemas/Breed

func NewBreed

func NewBreed(e service.Breed) Breed

func NewBreedList

func NewBreedList(es []service.Breed) []Breed

func (*Breed) Decode

func (s *Breed) Decode(d *jx.Decoder) error

Decode decodes Breed from json.

func (*Breed) Encode

func (s *Breed) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Breed) GetCreateTime

func (s *Breed) GetCreateTime() time.Time

GetCreateTime returns the value of CreateTime.

func (*Breed) GetDeletedTime

func (s *Breed) GetDeletedTime() OptDateTime

GetDeletedTime returns the value of DeletedTime.

func (*Breed) GetEdges

func (s *Breed) GetEdges() BreedEdges

GetEdges returns the value of Edges.

func (*Breed) GetID

func (s *Breed) GetID() uuid.UUID

GetID returns the value of ID.

func (*Breed) GetName

func (s *Breed) GetName() string

GetName returns the value of Name.

func (*Breed) GetUpdateTime

func (s *Breed) GetUpdateTime() time.Time

GetUpdateTime returns the value of UpdateTime.

func (*Breed) MarshalJSON

func (s *Breed) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Breed) SetCreateTime

func (s *Breed) SetCreateTime(val time.Time)

SetCreateTime sets the value of CreateTime.

func (*Breed) SetDeletedTime

func (s *Breed) SetDeletedTime(val OptDateTime)

SetDeletedTime sets the value of DeletedTime.

func (*Breed) SetEdges

func (s *Breed) SetEdges(val BreedEdges)

SetEdges sets the value of Edges.

func (*Breed) SetID

func (s *Breed) SetID(val uuid.UUID)

SetID sets the value of ID.

func (*Breed) SetName

func (s *Breed) SetName(val string)

SetName sets the value of Name.

func (*Breed) SetUpdateTime

func (s *Breed) SetUpdateTime(val time.Time)

SetUpdateTime sets the value of UpdateTime.

func (*Breed) UnmarshalJSON

func (s *Breed) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BreedEdges

type BreedEdges struct {
	Cats []Cat `json:"cats"`
}

func (*BreedEdges) Decode

func (s *BreedEdges) Decode(d *jx.Decoder) error

Decode decodes BreedEdges from json.

func (*BreedEdges) Encode

func (s *BreedEdges) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BreedEdges) GetCats

func (s *BreedEdges) GetCats() []Cat

GetCats returns the value of Cats.

func (*BreedEdges) MarshalJSON

func (s *BreedEdges) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BreedEdges) SetCats

func (s *BreedEdges) SetCats(val []Cat)

SetCats sets the value of Cats.

func (*BreedEdges) UnmarshalJSON

func (s *BreedEdges) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BreedList

type BreedList []Breed

func (*BreedList) Decode

func (s *BreedList) Decode(d *jx.Decoder) error

Decode decodes BreedList from json.

func (BreedList) Encode

func (s BreedList) Encode(e *jx.Encoder)

Encode encodes BreedList as json.

func (BreedList) MarshalJSON

func (s BreedList) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BreedList) UnmarshalJSON

func (s *BreedList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (BreedList) Validate

func (s BreedList) Validate() error

type BreedListHeaders

type BreedListHeaders struct {
	ContentRange int
	Response     BreedList
}

BreedListHeaders wraps BreedList with response headers.

func (*BreedListHeaders) GetContentRange

func (s *BreedListHeaders) GetContentRange() int

GetContentRange returns the value of ContentRange.

func (*BreedListHeaders) GetResponse

func (s *BreedListHeaders) GetResponse() BreedList

GetResponse returns the value of Response.

func (*BreedListHeaders) SetContentRange

func (s *BreedListHeaders) SetContentRange(val int)

SetContentRange sets the value of ContentRange.

func (*BreedListHeaders) SetResponse

func (s *BreedListHeaders) SetResponse(val BreedList)

SetResponse sets the value of Response.

func (*BreedListHeaders) Validate

func (s *BreedListHeaders) Validate() error

type Cat

type Cat struct {
	PhantomField OptString   `json:"PhantomField"`
	BreedID      uuid.UUID   `json:"breed_id"`
	CreateTime   time.Time   `json:"create_time"`
	DateFrom     time.Time   `json:"date_from"`
	DeletedTime  OptDateTime `json:"deleted_time"`
	Edges        CatEdges    `json:"edges"`
	ID           uuid.UUID   `json:"id"`
	Name         string      `json:"name"`
	OtherType    string      `json:"other_type"`
	Speed        int64       `json:"speed"`
	Type         string      `json:"type"`
	UpdateTime   time.Time   `json:"update_time"`
}

Ref: #/components/schemas/Cat

func NewCat

func NewCat(e service.Cat) Cat

func NewCatList

func NewCatList(es []service.Cat) []Cat

func (*Cat) Decode

func (s *Cat) Decode(d *jx.Decoder) error

Decode decodes Cat from json.

func (*Cat) Encode

func (s *Cat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Cat) GetBreedID

func (s *Cat) GetBreedID() uuid.UUID

GetBreedID returns the value of BreedID.

func (*Cat) GetCreateTime

func (s *Cat) GetCreateTime() time.Time

GetCreateTime returns the value of CreateTime.

func (*Cat) GetDateFrom

func (s *Cat) GetDateFrom() time.Time

GetDateFrom returns the value of DateFrom.

func (*Cat) GetDeletedTime

func (s *Cat) GetDeletedTime() OptDateTime

GetDeletedTime returns the value of DeletedTime.

func (*Cat) GetEdges

func (s *Cat) GetEdges() CatEdges

GetEdges returns the value of Edges.

func (*Cat) GetID

func (s *Cat) GetID() uuid.UUID

GetID returns the value of ID.

func (*Cat) GetName

func (s *Cat) GetName() string

GetName returns the value of Name.

func (*Cat) GetOtherType

func (s *Cat) GetOtherType() string

GetOtherType returns the value of OtherType.

func (*Cat) GetPhantomField

func (s *Cat) GetPhantomField() OptString

GetPhantomField returns the value of PhantomField.

func (*Cat) GetSpeed

func (s *Cat) GetSpeed() int64

GetSpeed returns the value of Speed.

func (*Cat) GetType

func (s *Cat) GetType() string

GetType returns the value of Type.

func (*Cat) GetUpdateTime

func (s *Cat) GetUpdateTime() time.Time

GetUpdateTime returns the value of UpdateTime.

func (*Cat) MarshalJSON

func (s *Cat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Cat) SetBreedID

func (s *Cat) SetBreedID(val uuid.UUID)

SetBreedID sets the value of BreedID.

func (*Cat) SetCreateTime

func (s *Cat) SetCreateTime(val time.Time)

SetCreateTime sets the value of CreateTime.

func (*Cat) SetDateFrom

func (s *Cat) SetDateFrom(val time.Time)

SetDateFrom sets the value of DateFrom.

func (*Cat) SetDeletedTime

func (s *Cat) SetDeletedTime(val OptDateTime)

SetDeletedTime sets the value of DeletedTime.

func (*Cat) SetEdges

func (s *Cat) SetEdges(val CatEdges)

SetEdges sets the value of Edges.

func (*Cat) SetID

func (s *Cat) SetID(val uuid.UUID)

SetID sets the value of ID.

func (*Cat) SetName

func (s *Cat) SetName(val string)

SetName sets the value of Name.

func (*Cat) SetOtherType

func (s *Cat) SetOtherType(val string)

SetOtherType sets the value of OtherType.

func (*Cat) SetPhantomField

func (s *Cat) SetPhantomField(val OptString)

SetPhantomField sets the value of PhantomField.

func (*Cat) SetSpeed

func (s *Cat) SetSpeed(val int64)

SetSpeed sets the value of Speed.

func (*Cat) SetType

func (s *Cat) SetType(val string)

SetType sets the value of Type.

func (*Cat) SetUpdateTime

func (s *Cat) SetUpdateTime(val time.Time)

SetUpdateTime sets the value of UpdateTime.

func (*Cat) UnmarshalJSON

func (s *Cat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CatEdges

type CatEdges struct {
	Breed   OptBreed `json:"breed"`
	Kittens []Kitten `json:"kittens"`
}

func (*CatEdges) Decode

func (s *CatEdges) Decode(d *jx.Decoder) error

Decode decodes CatEdges from json.

func (*CatEdges) Encode

func (s *CatEdges) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CatEdges) GetBreed

func (s *CatEdges) GetBreed() OptBreed

GetBreed returns the value of Breed.

func (*CatEdges) GetKittens

func (s *CatEdges) GetKittens() []Kitten

GetKittens returns the value of Kittens.

func (*CatEdges) MarshalJSON

func (s *CatEdges) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CatEdges) SetBreed

func (s *CatEdges) SetBreed(val OptBreed)

SetBreed sets the value of Breed.

func (*CatEdges) SetKittens

func (s *CatEdges) SetKittens(val []Kitten)

SetKittens sets the value of Kittens.

func (*CatEdges) UnmarshalJSON

func (s *CatEdges) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CatList

type CatList []Cat

func (*CatList) Decode

func (s *CatList) Decode(d *jx.Decoder) error

Decode decodes CatList from json.

func (CatList) Encode

func (s CatList) Encode(e *jx.Encoder)

Encode encodes CatList as json.

func (CatList) MarshalJSON

func (s CatList) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CatList) UnmarshalJSON

func (s *CatList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (CatList) Validate

func (s CatList) Validate() error

type CatListHeaders

type CatListHeaders struct {
	ContentRange int
	Response     CatList
}

CatListHeaders wraps CatList with response headers.

func (*CatListHeaders) GetContentRange

func (s *CatListHeaders) GetContentRange() int

GetContentRange returns the value of ContentRange.

func (*CatListHeaders) GetResponse

func (s *CatListHeaders) GetResponse() CatList

GetResponse returns the value of Response.

func (*CatListHeaders) SetContentRange

func (s *CatListHeaders) SetContentRange(val int)

SetContentRange sets the value of ContentRange.

func (*CatListHeaders) SetResponse

func (s *CatListHeaders) SetResponse(val CatList)

SetResponse sets the value of Response.

func (*CatListHeaders) Validate

func (s *CatListHeaders) Validate() error

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) CreateBreed

func (c *Client) CreateBreed(ctx context.Context, request *CreateBreed) (CreateBreedRes, error)

CreateBreed invokes createBreed operation.

Create a new Breed and persists it to storage.

POST /breed

func (*Client) CreateCat

func (c *Client) CreateCat(ctx context.Context, request *CreateCat) (CreateCatRes, error)

CreateCat invokes createCat operation.

Create a new Cat and persists it to storage.

POST /cat

func (*Client) CreateFatherCat

func (c *Client) CreateFatherCat(ctx context.Context, request *CreateFatherCat) (CreateFatherCatRes, error)

CreateFatherCat invokes createFatherCat operation.

Create a new FatherCat and persists it to storage.

POST /fathercat

func (*Client) CreateKitten

func (c *Client) CreateKitten(ctx context.Context, request *CreateKitten) (CreateKittenRes, error)

CreateKitten invokes createKitten operation.

Create a new Kitten and persists it to storage.

POST /kitten

func (*Client) DeleteBreed

func (c *Client) DeleteBreed(ctx context.Context, params DeleteBreedParams) (DeleteBreedRes, error)

DeleteBreed invokes deleteBreed operation.

Delete Breed.

DELETE /breed/{id}

func (*Client) DeleteCat

func (c *Client) DeleteCat(ctx context.Context, params DeleteCatParams) (DeleteCatRes, error)

DeleteCat invokes deleteCat operation.

Delete Cat.

DELETE /cat/{id}

func (*Client) DeleteFatherCat

func (c *Client) DeleteFatherCat(ctx context.Context, params DeleteFatherCatParams) (DeleteFatherCatRes, error)

DeleteFatherCat invokes deleteFatherCat operation.

Delete FatherCat.

DELETE /fathercat/{id}

func (*Client) DeleteKitten

func (c *Client) DeleteKitten(ctx context.Context, params DeleteKittenParams) (DeleteKittenRes, error)

DeleteKitten invokes deleteKitten operation.

Delete Kitten.

DELETE /kitten/{id}

func (*Client) ListBreed

func (c *Client) ListBreed(ctx context.Context, params ListBreedParams) (ListBreedRes, error)

ListBreed invokes listBreed operation.

List for Breeds.

GET /breed

func (*Client) ListCat

func (c *Client) ListCat(ctx context.Context, params ListCatParams) (ListCatRes, error)

ListCat invokes listCat operation.

List for Cats.

GET /cat

func (*Client) ListFatherCat

func (c *Client) ListFatherCat(ctx context.Context, params ListFatherCatParams) (ListFatherCatRes, error)

ListFatherCat invokes listFatherCat operation.

List for FatherCats.

GET /fathercat

func (*Client) ListKitten

func (c *Client) ListKitten(ctx context.Context, params ListKittenParams) (ListKittenRes, error)

ListKitten invokes listKitten operation.

List for Kittens.

GET /kitten

func (*Client) ReadBreed

func (c *Client) ReadBreed(ctx context.Context, params ReadBreedParams) (ReadBreedRes, error)

ReadBreed invokes readBreed operation.

Finds the Breed with the requested ID and returns it.

GET /breed/{id}

func (*Client) ReadCat

func (c *Client) ReadCat(ctx context.Context, params ReadCatParams) (ReadCatRes, error)

ReadCat invokes readCat operation.

Finds the Cat with the requested ID and returns it.

GET /cat/{id}

func (*Client) ReadFatherCat

func (c *Client) ReadFatherCat(ctx context.Context, params ReadFatherCatParams) (ReadFatherCatRes, error)

ReadFatherCat invokes readFatherCat operation.

Finds the FatherCat with the requested ID and returns it.

GET /fathercat/{id}

func (*Client) ReadKitten

func (c *Client) ReadKitten(ctx context.Context, params ReadKittenParams) (ReadKittenRes, error)

ReadKitten invokes readKitten operation.

Finds the Kitten with the requested ID and returns it.

GET /kitten/{id}

func (*Client) UpdateBreed

func (c *Client) UpdateBreed(ctx context.Context, request *UpdateBreed, params UpdateBreedParams) (UpdateBreedRes, error)

UpdateBreed invokes updateBreed operation.

Update Breed and persists it to storage.

PUT /breed/{id}

func (*Client) UpdateCat

func (c *Client) UpdateCat(ctx context.Context, request *UpdateCat, params UpdateCatParams) (UpdateCatRes, error)

UpdateCat invokes updateCat operation.

Update Cat and persists it to storage.

PUT /cat/{id}

func (*Client) UpdateFatherCat

func (c *Client) UpdateFatherCat(ctx context.Context, request *UpdateFatherCat, params UpdateFatherCatParams) (UpdateFatherCatRes, error)

UpdateFatherCat invokes updateFatherCat operation.

Update FatherCat and persists it to storage.

PUT /fathercat/{id}

func (*Client) UpdateKitten

func (c *Client) UpdateKitten(ctx context.Context, request *UpdateKitten, params UpdateKittenParams) (UpdateKittenRes, error)

UpdateKitten invokes updateKitten operation.

Update Kitten and persists it to storage.

PUT /kitten/{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 CreateBreed

type CreateBreed struct {
	CreateTime  time.Time           `json:"create_time"`
	DeletedTime OptDateTime         `json:"deleted_time"`
	Edges       OptCreateBreedEdges `json:"edges"`
	ID          uuid.UUID           `json:"id"`
	Name        string              `json:"name"`
	UpdateTime  time.Time           `json:"update_time"`
}

Ref: #/components/schemas/CreateBreed

func (*CreateBreed) Decode

func (s *CreateBreed) Decode(d *jx.Decoder) error

Decode decodes CreateBreed from json.

func (*CreateBreed) Encode

func (s *CreateBreed) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateBreed) GetCreateTime

func (s *CreateBreed) GetCreateTime() time.Time

GetCreateTime returns the value of CreateTime.

func (*CreateBreed) GetDeletedTime

func (s *CreateBreed) GetDeletedTime() OptDateTime

GetDeletedTime returns the value of DeletedTime.

func (*CreateBreed) GetEdges

func (s *CreateBreed) GetEdges() OptCreateBreedEdges

GetEdges returns the value of Edges.

func (*CreateBreed) GetID

func (s *CreateBreed) GetID() uuid.UUID

GetID returns the value of ID.

func (*CreateBreed) GetName

func (s *CreateBreed) GetName() string

GetName returns the value of Name.

func (*CreateBreed) GetUpdateTime

func (s *CreateBreed) GetUpdateTime() time.Time

GetUpdateTime returns the value of UpdateTime.

func (*CreateBreed) MarshalJSON

func (s *CreateBreed) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateBreed) SetCreateTime

func (s *CreateBreed) SetCreateTime(val time.Time)

SetCreateTime sets the value of CreateTime.

func (*CreateBreed) SetDeletedTime

func (s *CreateBreed) SetDeletedTime(val OptDateTime)

SetDeletedTime sets the value of DeletedTime.

func (*CreateBreed) SetEdges

func (s *CreateBreed) SetEdges(val OptCreateBreedEdges)

SetEdges sets the value of Edges.

func (*CreateBreed) SetID

func (s *CreateBreed) SetID(val uuid.UUID)

SetID sets the value of ID.

func (*CreateBreed) SetName

func (s *CreateBreed) SetName(val string)

SetName sets the value of Name.

func (*CreateBreed) SetUpdateTime

func (s *CreateBreed) SetUpdateTime(val time.Time)

SetUpdateTime sets the value of UpdateTime.

func (*CreateBreed) UnmarshalJSON

func (s *CreateBreed) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateBreedEdges

type CreateBreedEdges struct {
	Cats []CreateCat `json:"cats"`
}

func (*CreateBreedEdges) Decode

func (s *CreateBreedEdges) Decode(d *jx.Decoder) error

Decode decodes CreateBreedEdges from json.

func (*CreateBreedEdges) Encode

func (s *CreateBreedEdges) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateBreedEdges) GetCats

func (s *CreateBreedEdges) GetCats() []CreateCat

GetCats returns the value of Cats.

func (*CreateBreedEdges) MarshalJSON

func (s *CreateBreedEdges) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateBreedEdges) SetCats

func (s *CreateBreedEdges) SetCats(val []CreateCat)

SetCats sets the value of Cats.

func (*CreateBreedEdges) UnmarshalJSON

func (s *CreateBreedEdges) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateBreedRes

type CreateBreedRes interface {
	// contains filtered or unexported methods
}

type CreateCat

type CreateCat struct {
	PhantomField OptString         `json:"PhantomField"`
	BreedID      uuid.UUID         `json:"breed_id"`
	CreateTime   time.Time         `json:"create_time"`
	DateFrom     time.Time         `json:"date_from"`
	DeletedTime  OptDateTime       `json:"deleted_time"`
	Edges        OptCreateCatEdges `json:"edges"`
	ID           uuid.UUID         `json:"id"`
	Name         string            `json:"name"`
	OtherType    string            `json:"other_type"`
	Speed        int64             `json:"speed"`
	Type         string            `json:"type"`
	UpdateTime   time.Time         `json:"update_time"`
}

Ref: #/components/schemas/CreateCat

func (*CreateCat) Decode

func (s *CreateCat) Decode(d *jx.Decoder) error

Decode decodes CreateCat from json.

func (*CreateCat) Encode

func (s *CreateCat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateCat) GetBreedID

func (s *CreateCat) GetBreedID() uuid.UUID

GetBreedID returns the value of BreedID.

func (*CreateCat) GetCreateTime

func (s *CreateCat) GetCreateTime() time.Time

GetCreateTime returns the value of CreateTime.

func (*CreateCat) GetDateFrom

func (s *CreateCat) GetDateFrom() time.Time

GetDateFrom returns the value of DateFrom.

func (*CreateCat) GetDeletedTime

func (s *CreateCat) GetDeletedTime() OptDateTime

GetDeletedTime returns the value of DeletedTime.

func (*CreateCat) GetEdges

func (s *CreateCat) GetEdges() OptCreateCatEdges

GetEdges returns the value of Edges.

func (*CreateCat) GetID

func (s *CreateCat) GetID() uuid.UUID

GetID returns the value of ID.

func (*CreateCat) GetName

func (s *CreateCat) GetName() string

GetName returns the value of Name.

func (*CreateCat) GetOtherType

func (s *CreateCat) GetOtherType() string

GetOtherType returns the value of OtherType.

func (*CreateCat) GetPhantomField

func (s *CreateCat) GetPhantomField() OptString

GetPhantomField returns the value of PhantomField.

func (*CreateCat) GetSpeed

func (s *CreateCat) GetSpeed() int64

GetSpeed returns the value of Speed.

func (*CreateCat) GetType

func (s *CreateCat) GetType() string

GetType returns the value of Type.

func (*CreateCat) GetUpdateTime

func (s *CreateCat) GetUpdateTime() time.Time

GetUpdateTime returns the value of UpdateTime.

func (*CreateCat) MarshalJSON

func (s *CreateCat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateCat) SetBreedID

func (s *CreateCat) SetBreedID(val uuid.UUID)

SetBreedID sets the value of BreedID.

func (*CreateCat) SetCreateTime

func (s *CreateCat) SetCreateTime(val time.Time)

SetCreateTime sets the value of CreateTime.

func (*CreateCat) SetDateFrom

func (s *CreateCat) SetDateFrom(val time.Time)

SetDateFrom sets the value of DateFrom.

func (*CreateCat) SetDeletedTime

func (s *CreateCat) SetDeletedTime(val OptDateTime)

SetDeletedTime sets the value of DeletedTime.

func (*CreateCat) SetEdges

func (s *CreateCat) SetEdges(val OptCreateCatEdges)

SetEdges sets the value of Edges.

func (*CreateCat) SetID

func (s *CreateCat) SetID(val uuid.UUID)

SetID sets the value of ID.

func (*CreateCat) SetName

func (s *CreateCat) SetName(val string)

SetName sets the value of Name.

func (*CreateCat) SetOtherType

func (s *CreateCat) SetOtherType(val string)

SetOtherType sets the value of OtherType.

func (*CreateCat) SetPhantomField

func (s *CreateCat) SetPhantomField(val OptString)

SetPhantomField sets the value of PhantomField.

func (*CreateCat) SetSpeed

func (s *CreateCat) SetSpeed(val int64)

SetSpeed sets the value of Speed.

func (*CreateCat) SetType

func (s *CreateCat) SetType(val string)

SetType sets the value of Type.

func (*CreateCat) SetUpdateTime

func (s *CreateCat) SetUpdateTime(val time.Time)

SetUpdateTime sets the value of UpdateTime.

func (*CreateCat) UnmarshalJSON

func (s *CreateCat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateCatEdges

type CreateCatEdges struct {
	Breed   OptCreateBreed `json:"breed"`
	Kittens []CreateKitten `json:"kittens"`
}

func (*CreateCatEdges) Decode

func (s *CreateCatEdges) Decode(d *jx.Decoder) error

Decode decodes CreateCatEdges from json.

func (*CreateCatEdges) Encode

func (s *CreateCatEdges) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateCatEdges) GetBreed

func (s *CreateCatEdges) GetBreed() OptCreateBreed

GetBreed returns the value of Breed.

func (*CreateCatEdges) GetKittens

func (s *CreateCatEdges) GetKittens() []CreateKitten

GetKittens returns the value of Kittens.

func (*CreateCatEdges) MarshalJSON

func (s *CreateCatEdges) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateCatEdges) SetBreed

func (s *CreateCatEdges) SetBreed(val OptCreateBreed)

SetBreed sets the value of Breed.

func (*CreateCatEdges) SetKittens

func (s *CreateCatEdges) SetKittens(val []CreateKitten)

SetKittens sets the value of Kittens.

func (*CreateCatEdges) UnmarshalJSON

func (s *CreateCatEdges) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateCatRes

type CreateCatRes interface {
	// contains filtered or unexported methods
}

type CreateFatherCat

type CreateFatherCat struct {
	CreateTime  time.Time   `json:"create_time"`
	DeletedTime OptDateTime `json:"deleted_time"`
	ID          uuid.UUID   `json:"id"`
	Name        string      `json:"name"`
	UpdateTime  time.Time   `json:"update_time"`
}

Ref: #/components/schemas/CreateFatherCat

func (*CreateFatherCat) Decode

func (s *CreateFatherCat) Decode(d *jx.Decoder) error

Decode decodes CreateFatherCat from json.

func (*CreateFatherCat) Encode

func (s *CreateFatherCat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateFatherCat) GetCreateTime

func (s *CreateFatherCat) GetCreateTime() time.Time

GetCreateTime returns the value of CreateTime.

func (*CreateFatherCat) GetDeletedTime

func (s *CreateFatherCat) GetDeletedTime() OptDateTime

GetDeletedTime returns the value of DeletedTime.

func (*CreateFatherCat) GetID

func (s *CreateFatherCat) GetID() uuid.UUID

GetID returns the value of ID.

func (*CreateFatherCat) GetName

func (s *CreateFatherCat) GetName() string

GetName returns the value of Name.

func (*CreateFatherCat) GetUpdateTime

func (s *CreateFatherCat) GetUpdateTime() time.Time

GetUpdateTime returns the value of UpdateTime.

func (*CreateFatherCat) MarshalJSON

func (s *CreateFatherCat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateFatherCat) SetCreateTime

func (s *CreateFatherCat) SetCreateTime(val time.Time)

SetCreateTime sets the value of CreateTime.

func (*CreateFatherCat) SetDeletedTime

func (s *CreateFatherCat) SetDeletedTime(val OptDateTime)

SetDeletedTime sets the value of DeletedTime.

func (*CreateFatherCat) SetID

func (s *CreateFatherCat) SetID(val uuid.UUID)

SetID sets the value of ID.

func (*CreateFatherCat) SetName

func (s *CreateFatherCat) SetName(val string)

SetName sets the value of Name.

func (*CreateFatherCat) SetUpdateTime

func (s *CreateFatherCat) SetUpdateTime(val time.Time)

SetUpdateTime sets the value of UpdateTime.

func (*CreateFatherCat) UnmarshalJSON

func (s *CreateFatherCat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateFatherCatRes

type CreateFatherCatRes interface {
	// contains filtered or unexported methods
}

type CreateKitten

type CreateKitten struct {
	CreateTime  time.Time            `json:"create_time"`
	DeletedTime OptDateTime          `json:"deleted_time"`
	Edges       OptCreateKittenEdges `json:"edges"`
	ID          uuid.UUID            `json:"id"`
	MotherID    uuid.UUID            `json:"mother_id"`
	Name        string               `json:"name"`
	UpdateTime  time.Time            `json:"update_time"`
}

Ref: #/components/schemas/CreateKitten

func (*CreateKitten) Decode

func (s *CreateKitten) Decode(d *jx.Decoder) error

Decode decodes CreateKitten from json.

func (*CreateKitten) Encode

func (s *CreateKitten) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateKitten) GetCreateTime

func (s *CreateKitten) GetCreateTime() time.Time

GetCreateTime returns the value of CreateTime.

func (*CreateKitten) GetDeletedTime

func (s *CreateKitten) GetDeletedTime() OptDateTime

GetDeletedTime returns the value of DeletedTime.

func (*CreateKitten) GetEdges

func (s *CreateKitten) GetEdges() OptCreateKittenEdges

GetEdges returns the value of Edges.

func (*CreateKitten) GetID

func (s *CreateKitten) GetID() uuid.UUID

GetID returns the value of ID.

func (*CreateKitten) GetMotherID

func (s *CreateKitten) GetMotherID() uuid.UUID

GetMotherID returns the value of MotherID.

func (*CreateKitten) GetName

func (s *CreateKitten) GetName() string

GetName returns the value of Name.

func (*CreateKitten) GetUpdateTime

func (s *CreateKitten) GetUpdateTime() time.Time

GetUpdateTime returns the value of UpdateTime.

func (*CreateKitten) MarshalJSON

func (s *CreateKitten) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateKitten) SetCreateTime

func (s *CreateKitten) SetCreateTime(val time.Time)

SetCreateTime sets the value of CreateTime.

func (*CreateKitten) SetDeletedTime

func (s *CreateKitten) SetDeletedTime(val OptDateTime)

SetDeletedTime sets the value of DeletedTime.

func (*CreateKitten) SetEdges

func (s *CreateKitten) SetEdges(val OptCreateKittenEdges)

SetEdges sets the value of Edges.

func (*CreateKitten) SetID

func (s *CreateKitten) SetID(val uuid.UUID)

SetID sets the value of ID.

func (*CreateKitten) SetMotherID

func (s *CreateKitten) SetMotherID(val uuid.UUID)

SetMotherID sets the value of MotherID.

func (*CreateKitten) SetName

func (s *CreateKitten) SetName(val string)

SetName sets the value of Name.

func (*CreateKitten) SetUpdateTime

func (s *CreateKitten) SetUpdateTime(val time.Time)

SetUpdateTime sets the value of UpdateTime.

func (*CreateKitten) UnmarshalJSON

func (s *CreateKitten) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateKittenEdges

type CreateKittenEdges struct {
	Mother OptCreateCat `json:"mother"`
}

func (*CreateKittenEdges) Decode

func (s *CreateKittenEdges) Decode(d *jx.Decoder) error

Decode decodes CreateKittenEdges from json.

func (*CreateKittenEdges) Encode

func (s *CreateKittenEdges) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateKittenEdges) GetMother

func (s *CreateKittenEdges) GetMother() OptCreateCat

GetMother returns the value of Mother.

func (*CreateKittenEdges) MarshalJSON

func (s *CreateKittenEdges) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateKittenEdges) SetMother

func (s *CreateKittenEdges) SetMother(val OptCreateCat)

SetMother sets the value of Mother.

func (*CreateKittenEdges) UnmarshalJSON

func (s *CreateKittenEdges) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateKittenRes

type CreateKittenRes interface {
	// contains filtered or unexported methods
}

type DeleteBreedOK

type DeleteBreedOK struct {
	Status OptString `json:"status"`
}

func (*DeleteBreedOK) Decode

func (s *DeleteBreedOK) Decode(d *jx.Decoder) error

Decode decodes DeleteBreedOK from json.

func (*DeleteBreedOK) Encode

func (s *DeleteBreedOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DeleteBreedOK) GetStatus

func (s *DeleteBreedOK) GetStatus() OptString

GetStatus returns the value of Status.

func (*DeleteBreedOK) MarshalJSON

func (s *DeleteBreedOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteBreedOK) SetStatus

func (s *DeleteBreedOK) SetStatus(val OptString)

SetStatus sets the value of Status.

func (*DeleteBreedOK) UnmarshalJSON

func (s *DeleteBreedOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteBreedParams

type DeleteBreedParams struct {
	// ID of the Breed.
	ID uuid.UUID
}

DeleteBreedParams is parameters of deleteBreed operation.

type DeleteBreedRes

type DeleteBreedRes interface {
	// contains filtered or unexported methods
}

type DeleteCatOK

type DeleteCatOK struct {
	Status OptString `json:"status"`
}

func (*DeleteCatOK) Decode

func (s *DeleteCatOK) Decode(d *jx.Decoder) error

Decode decodes DeleteCatOK from json.

func (*DeleteCatOK) Encode

func (s *DeleteCatOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DeleteCatOK) GetStatus

func (s *DeleteCatOK) GetStatus() OptString

GetStatus returns the value of Status.

func (*DeleteCatOK) MarshalJSON

func (s *DeleteCatOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteCatOK) SetStatus

func (s *DeleteCatOK) SetStatus(val OptString)

SetStatus sets the value of Status.

func (*DeleteCatOK) UnmarshalJSON

func (s *DeleteCatOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteCatParams

type DeleteCatParams struct {
	// ID of the Cat.
	ID uuid.UUID
}

DeleteCatParams is parameters of deleteCat operation.

type DeleteCatRes

type DeleteCatRes interface {
	// contains filtered or unexported methods
}

type DeleteFatherCatOK

type DeleteFatherCatOK struct {
	Status OptString `json:"status"`
}

func (*DeleteFatherCatOK) Decode

func (s *DeleteFatherCatOK) Decode(d *jx.Decoder) error

Decode decodes DeleteFatherCatOK from json.

func (*DeleteFatherCatOK) Encode

func (s *DeleteFatherCatOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DeleteFatherCatOK) GetStatus

func (s *DeleteFatherCatOK) GetStatus() OptString

GetStatus returns the value of Status.

func (*DeleteFatherCatOK) MarshalJSON

func (s *DeleteFatherCatOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteFatherCatOK) SetStatus

func (s *DeleteFatherCatOK) SetStatus(val OptString)

SetStatus sets the value of Status.

func (*DeleteFatherCatOK) UnmarshalJSON

func (s *DeleteFatherCatOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteFatherCatParams

type DeleteFatherCatParams struct {
	// ID of the FatherCat.
	ID uuid.UUID
}

DeleteFatherCatParams is parameters of deleteFatherCat operation.

type DeleteFatherCatRes

type DeleteFatherCatRes interface {
	// contains filtered or unexported methods
}

type DeleteKittenOK

type DeleteKittenOK struct {
	Status OptString `json:"status"`
}

func (*DeleteKittenOK) Decode

func (s *DeleteKittenOK) Decode(d *jx.Decoder) error

Decode decodes DeleteKittenOK from json.

func (*DeleteKittenOK) Encode

func (s *DeleteKittenOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DeleteKittenOK) GetStatus

func (s *DeleteKittenOK) GetStatus() OptString

GetStatus returns the value of Status.

func (*DeleteKittenOK) MarshalJSON

func (s *DeleteKittenOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteKittenOK) SetStatus

func (s *DeleteKittenOK) SetStatus(val OptString)

SetStatus sets the value of Status.

func (*DeleteKittenOK) UnmarshalJSON

func (s *DeleteKittenOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteKittenParams

type DeleteKittenParams struct {
	// ID of the Kitten.
	ID uuid.UUID
}

DeleteKittenParams is parameters of deleteKitten operation.

type DeleteKittenRes

type DeleteKittenRes interface {
	// contains filtered or unexported methods
}

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type ErrorItem

type ErrorItem struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func (*ErrorItem) Decode

func (s *ErrorItem) Decode(d *jx.Decoder) error

Decode decodes ErrorItem from json.

func (*ErrorItem) Encode

func (s *ErrorItem) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ErrorItem) GetCode

func (s *ErrorItem) GetCode() int

GetCode returns the value of Code.

func (*ErrorItem) GetMessage

func (s *ErrorItem) GetMessage() string

GetMessage returns the value of Message.

func (*ErrorItem) MarshalJSON

func (s *ErrorItem) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ErrorItem) SetCode

func (s *ErrorItem) SetCode(val int)

SetCode sets the value of Code.

func (*ErrorItem) SetMessage

func (s *ErrorItem) SetMessage(val string)

SetMessage sets the value of Message.

func (*ErrorItem) UnmarshalJSON

func (s *ErrorItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorStatusCode

type ErrorStatusCode struct {
	StatusCode int
	Response   []ErrorItem
}

ErrorStatusCode wraps []ErrorItem with StatusCode.

func (*ErrorStatusCode) Error

func (s *ErrorStatusCode) Error() string

func (*ErrorStatusCode) GetResponse

func (s *ErrorStatusCode) GetResponse() []ErrorItem

GetResponse returns the value of Response.

func (*ErrorStatusCode) GetStatusCode

func (s *ErrorStatusCode) GetStatusCode() int

GetStatusCode returns the value of StatusCode.

func (*ErrorStatusCode) SetResponse

func (s *ErrorStatusCode) SetResponse(val []ErrorItem)

SetResponse sets the value of Response.

func (*ErrorStatusCode) SetStatusCode

func (s *ErrorStatusCode) SetStatusCode(val int)

SetStatusCode sets the value of StatusCode.

func (*ErrorStatusCode) Validate

func (s *ErrorStatusCode) Validate() error

type FatherCat

type FatherCat struct {
	CreateTime  time.Time   `json:"create_time"`
	DeletedTime OptDateTime `json:"deleted_time"`
	ID          uuid.UUID   `json:"id"`
	Name        string      `json:"name"`
	UpdateTime  time.Time   `json:"update_time"`
}

Ref: #/components/schemas/FatherCat

func NewFatherCat

func NewFatherCat(e service.FatherCat) FatherCat

func NewFatherCatList

func NewFatherCatList(es []service.FatherCat) []FatherCat

func (*FatherCat) Decode

func (s *FatherCat) Decode(d *jx.Decoder) error

Decode decodes FatherCat from json.

func (*FatherCat) Encode

func (s *FatherCat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*FatherCat) GetCreateTime

func (s *FatherCat) GetCreateTime() time.Time

GetCreateTime returns the value of CreateTime.

func (*FatherCat) GetDeletedTime

func (s *FatherCat) GetDeletedTime() OptDateTime

GetDeletedTime returns the value of DeletedTime.

func (*FatherCat) GetID

func (s *FatherCat) GetID() uuid.UUID

GetID returns the value of ID.

func (*FatherCat) GetName

func (s *FatherCat) GetName() string

GetName returns the value of Name.

func (*FatherCat) GetUpdateTime

func (s *FatherCat) GetUpdateTime() time.Time

GetUpdateTime returns the value of UpdateTime.

func (*FatherCat) MarshalJSON

func (s *FatherCat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FatherCat) SetCreateTime

func (s *FatherCat) SetCreateTime(val time.Time)

SetCreateTime sets the value of CreateTime.

func (*FatherCat) SetDeletedTime

func (s *FatherCat) SetDeletedTime(val OptDateTime)

SetDeletedTime sets the value of DeletedTime.

func (*FatherCat) SetID

func (s *FatherCat) SetID(val uuid.UUID)

SetID sets the value of ID.

func (*FatherCat) SetName

func (s *FatherCat) SetName(val string)

SetName sets the value of Name.

func (*FatherCat) SetUpdateTime

func (s *FatherCat) SetUpdateTime(val time.Time)

SetUpdateTime sets the value of UpdateTime.

func (*FatherCat) UnmarshalJSON

func (s *FatherCat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type FatherCatList

type FatherCatList []FatherCat

func (*FatherCatList) Decode

func (s *FatherCatList) Decode(d *jx.Decoder) error

Decode decodes FatherCatList from json.

func (FatherCatList) Encode

func (s FatherCatList) Encode(e *jx.Encoder)

Encode encodes FatherCatList as json.

func (FatherCatList) MarshalJSON

func (s FatherCatList) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FatherCatList) UnmarshalJSON

func (s *FatherCatList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (FatherCatList) Validate

func (s FatherCatList) Validate() error

type FatherCatListHeaders

type FatherCatListHeaders struct {
	ContentRange int
	Response     FatherCatList
}

FatherCatListHeaders wraps FatherCatList with response headers.

func (*FatherCatListHeaders) GetContentRange

func (s *FatherCatListHeaders) GetContentRange() int

GetContentRange returns the value of ContentRange.

func (*FatherCatListHeaders) GetResponse

func (s *FatherCatListHeaders) GetResponse() FatherCatList

GetResponse returns the value of Response.

func (*FatherCatListHeaders) SetContentRange

func (s *FatherCatListHeaders) SetContentRange(val int)

SetContentRange sets the value of ContentRange.

func (*FatherCatListHeaders) SetResponse

func (s *FatherCatListHeaders) SetResponse(val FatherCatList)

SetResponse sets the value of Response.

func (*FatherCatListHeaders) Validate

func (s *FatherCatListHeaders) Validate() error

type Handler

type Handler interface {
	// CreateBreed implements createBreed operation.
	//
	// Create a new Breed  and persists it to storage.
	//
	// POST /breed
	CreateBreed(ctx context.Context, req *CreateBreed) (CreateBreedRes, error)
	// CreateCat implements createCat operation.
	//
	// Create a new Cat  and persists it to storage.
	//
	// POST /cat
	CreateCat(ctx context.Context, req *CreateCat) (CreateCatRes, error)
	// CreateFatherCat implements createFatherCat operation.
	//
	// Create a new FatherCat  and persists it to storage.
	//
	// POST /fathercat
	CreateFatherCat(ctx context.Context, req *CreateFatherCat) (CreateFatherCatRes, error)
	// CreateKitten implements createKitten operation.
	//
	// Create a new Kitten  and persists it to storage.
	//
	// POST /kitten
	CreateKitten(ctx context.Context, req *CreateKitten) (CreateKittenRes, error)
	// DeleteBreed implements deleteBreed operation.
	//
	// Delete Breed.
	//
	// DELETE /breed/{id}
	DeleteBreed(ctx context.Context, params DeleteBreedParams) (DeleteBreedRes, error)
	// DeleteCat implements deleteCat operation.
	//
	// Delete Cat.
	//
	// DELETE /cat/{id}
	DeleteCat(ctx context.Context, params DeleteCatParams) (DeleteCatRes, error)
	// DeleteFatherCat implements deleteFatherCat operation.
	//
	// Delete FatherCat.
	//
	// DELETE /fathercat/{id}
	DeleteFatherCat(ctx context.Context, params DeleteFatherCatParams) (DeleteFatherCatRes, error)
	// DeleteKitten implements deleteKitten operation.
	//
	// Delete Kitten.
	//
	// DELETE /kitten/{id}
	DeleteKitten(ctx context.Context, params DeleteKittenParams) (DeleteKittenRes, error)
	// ListBreed implements listBreed operation.
	//
	// List for Breeds.
	//
	// GET /breed
	ListBreed(ctx context.Context, params ListBreedParams) (ListBreedRes, error)
	// ListCat implements listCat operation.
	//
	// List for Cats.
	//
	// GET /cat
	ListCat(ctx context.Context, params ListCatParams) (ListCatRes, error)
	// ListFatherCat implements listFatherCat operation.
	//
	// List for FatherCats.
	//
	// GET /fathercat
	ListFatherCat(ctx context.Context, params ListFatherCatParams) (ListFatherCatRes, error)
	// ListKitten implements listKitten operation.
	//
	// List for Kittens.
	//
	// GET /kitten
	ListKitten(ctx context.Context, params ListKittenParams) (ListKittenRes, error)
	// ReadBreed implements readBreed operation.
	//
	// Finds the Breed with the requested ID and returns it.
	//
	// GET /breed/{id}
	ReadBreed(ctx context.Context, params ReadBreedParams) (ReadBreedRes, error)
	// ReadCat implements readCat operation.
	//
	// Finds the Cat with the requested ID and returns it.
	//
	// GET /cat/{id}
	ReadCat(ctx context.Context, params ReadCatParams) (ReadCatRes, error)
	// ReadFatherCat implements readFatherCat operation.
	//
	// Finds the FatherCat with the requested ID and returns it.
	//
	// GET /fathercat/{id}
	ReadFatherCat(ctx context.Context, params ReadFatherCatParams) (ReadFatherCatRes, error)
	// ReadKitten implements readKitten operation.
	//
	// Finds the Kitten with the requested ID and returns it.
	//
	// GET /kitten/{id}
	ReadKitten(ctx context.Context, params ReadKittenParams) (ReadKittenRes, error)
	// UpdateBreed implements updateBreed operation.
	//
	// Update Breed  and persists it to storage.
	//
	// PUT /breed/{id}
	UpdateBreed(ctx context.Context, req *UpdateBreed, params UpdateBreedParams) (UpdateBreedRes, error)
	// UpdateCat implements updateCat operation.
	//
	// Update Cat  and persists it to storage.
	//
	// PUT /cat/{id}
	UpdateCat(ctx context.Context, req *UpdateCat, params UpdateCatParams) (UpdateCatRes, error)
	// UpdateFatherCat implements updateFatherCat operation.
	//
	// Update FatherCat  and persists it to storage.
	//
	// PUT /fathercat/{id}
	UpdateFatherCat(ctx context.Context, req *UpdateFatherCat, params UpdateFatherCatParams) (UpdateFatherCatRes, error)
	// UpdateKitten implements updateKitten operation.
	//
	// Update Kitten  and persists it to storage.
	//
	// PUT /kitten/{id}
	UpdateKitten(ctx context.Context, req *UpdateKitten, params UpdateKittenParams) (UpdateKittenRes, error)
	// NewError creates *ErrorStatusCode from error returned by handler.
	//
	// Used for common default response.
	NewError(ctx context.Context, err error) *ErrorStatusCode
}

Handler handles operations described by OpenAPI v3 specification.

type HandlerImpl

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

func NewHandler

func NewHandler(
	client *gen.Client,
	srvc *service.Service, logger *zap.Logger,
) *HandlerImpl

func (*HandlerImpl) CreateBreed

func (h *HandlerImpl) CreateBreed(ctx context.Context, req *CreateBreed) (CreateBreedRes, error)

func (*HandlerImpl) CreateCat

func (h *HandlerImpl) CreateCat(ctx context.Context, req *CreateCat) (CreateCatRes, error)

func (*HandlerImpl) CreateFatherCat

func (h *HandlerImpl) CreateFatherCat(ctx context.Context, req *CreateFatherCat) (CreateFatherCatRes, error)

func (*HandlerImpl) CreateKitten

func (h *HandlerImpl) CreateKitten(ctx context.Context, req *CreateKitten) (CreateKittenRes, error)

func (*HandlerImpl) DeleteBreed

func (h *HandlerImpl) DeleteBreed(ctx context.Context, params DeleteBreedParams) (DeleteBreedRes, error)

DeleteBreed handles DELETE /breed/{id} requests.

func (*HandlerImpl) DeleteCat

func (h *HandlerImpl) DeleteCat(ctx context.Context, params DeleteCatParams) (DeleteCatRes, error)

DeleteCat handles DELETE /cat/{id} requests.

func (*HandlerImpl) DeleteFatherCat

func (h *HandlerImpl) DeleteFatherCat(ctx context.Context, params DeleteFatherCatParams) (DeleteFatherCatRes, error)

DeleteFatherCat handles DELETE /fathercat/{id} requests.

func (*HandlerImpl) DeleteKitten

func (h *HandlerImpl) DeleteKitten(ctx context.Context, params DeleteKittenParams) (DeleteKittenRes, error)

DeleteKitten handles DELETE /kitten/{id} requests.

func (*HandlerImpl) ListBreed

func (h *HandlerImpl) ListBreed(ctx context.Context, params ListBreedParams) (ListBreedRes, error)

func (*HandlerImpl) ListCat

func (h *HandlerImpl) ListCat(ctx context.Context, params ListCatParams) (ListCatRes, error)

func (*HandlerImpl) ListFatherCat

func (h *HandlerImpl) ListFatherCat(ctx context.Context, params ListFatherCatParams) (ListFatherCatRes, error)

func (*HandlerImpl) ListKitten

func (h *HandlerImpl) ListKitten(ctx context.Context, params ListKittenParams) (ListKittenRes, error)

func (*HandlerImpl) NewError

func (h *HandlerImpl) NewError(ctx context.Context, err error) *ErrorStatusCode

func (*HandlerImpl) ReadBreed

func (h *HandlerImpl) ReadBreed(ctx context.Context, params ReadBreedParams) (ReadBreedRes, error)

func (*HandlerImpl) ReadCat

func (h *HandlerImpl) ReadCat(ctx context.Context, params ReadCatParams) (ReadCatRes, error)

func (*HandlerImpl) ReadFatherCat

func (h *HandlerImpl) ReadFatherCat(ctx context.Context, params ReadFatherCatParams) (ReadFatherCatRes, error)

func (*HandlerImpl) ReadKitten

func (h *HandlerImpl) ReadKitten(ctx context.Context, params ReadKittenParams) (ReadKittenRes, error)

func (*HandlerImpl) UpdateBreed

func (h *HandlerImpl) UpdateBreed(ctx context.Context, req *UpdateBreed, params UpdateBreedParams) (UpdateBreedRes, error)

func (*HandlerImpl) UpdateCat

func (h *HandlerImpl) UpdateCat(ctx context.Context, req *UpdateCat, params UpdateCatParams) (UpdateCatRes, error)

func (*HandlerImpl) UpdateFatherCat

func (h *HandlerImpl) UpdateFatherCat(ctx context.Context, req *UpdateFatherCat, params UpdateFatherCatParams) (UpdateFatherCatRes, error)

func (*HandlerImpl) UpdateKitten

func (h *HandlerImpl) UpdateKitten(ctx context.Context, req *UpdateKitten, params UpdateKittenParams) (UpdateKittenRes, error)

type Invoker

type Invoker interface {
	// CreateBreed invokes createBreed operation.
	//
	// Create a new Breed  and persists it to storage.
	//
	// POST /breed
	CreateBreed(ctx context.Context, request *CreateBreed) (CreateBreedRes, error)
	// CreateCat invokes createCat operation.
	//
	// Create a new Cat  and persists it to storage.
	//
	// POST /cat
	CreateCat(ctx context.Context, request *CreateCat) (CreateCatRes, error)
	// CreateFatherCat invokes createFatherCat operation.
	//
	// Create a new FatherCat  and persists it to storage.
	//
	// POST /fathercat
	CreateFatherCat(ctx context.Context, request *CreateFatherCat) (CreateFatherCatRes, error)
	// CreateKitten invokes createKitten operation.
	//
	// Create a new Kitten  and persists it to storage.
	//
	// POST /kitten
	CreateKitten(ctx context.Context, request *CreateKitten) (CreateKittenRes, error)
	// DeleteBreed invokes deleteBreed operation.
	//
	// Delete Breed.
	//
	// DELETE /breed/{id}
	DeleteBreed(ctx context.Context, params DeleteBreedParams) (DeleteBreedRes, error)
	// DeleteCat invokes deleteCat operation.
	//
	// Delete Cat.
	//
	// DELETE /cat/{id}
	DeleteCat(ctx context.Context, params DeleteCatParams) (DeleteCatRes, error)
	// DeleteFatherCat invokes deleteFatherCat operation.
	//
	// Delete FatherCat.
	//
	// DELETE /fathercat/{id}
	DeleteFatherCat(ctx context.Context, params DeleteFatherCatParams) (DeleteFatherCatRes, error)
	// DeleteKitten invokes deleteKitten operation.
	//
	// Delete Kitten.
	//
	// DELETE /kitten/{id}
	DeleteKitten(ctx context.Context, params DeleteKittenParams) (DeleteKittenRes, error)
	// ListBreed invokes listBreed operation.
	//
	// List for Breeds.
	//
	// GET /breed
	ListBreed(ctx context.Context, params ListBreedParams) (ListBreedRes, error)
	// ListCat invokes listCat operation.
	//
	// List for Cats.
	//
	// GET /cat
	ListCat(ctx context.Context, params ListCatParams) (ListCatRes, error)
	// ListFatherCat invokes listFatherCat operation.
	//
	// List for FatherCats.
	//
	// GET /fathercat
	ListFatherCat(ctx context.Context, params ListFatherCatParams) (ListFatherCatRes, error)
	// ListKitten invokes listKitten operation.
	//
	// List for Kittens.
	//
	// GET /kitten
	ListKitten(ctx context.Context, params ListKittenParams) (ListKittenRes, error)
	// ReadBreed invokes readBreed operation.
	//
	// Finds the Breed with the requested ID and returns it.
	//
	// GET /breed/{id}
	ReadBreed(ctx context.Context, params ReadBreedParams) (ReadBreedRes, error)
	// ReadCat invokes readCat operation.
	//
	// Finds the Cat with the requested ID and returns it.
	//
	// GET /cat/{id}
	ReadCat(ctx context.Context, params ReadCatParams) (ReadCatRes, error)
	// ReadFatherCat invokes readFatherCat operation.
	//
	// Finds the FatherCat with the requested ID and returns it.
	//
	// GET /fathercat/{id}
	ReadFatherCat(ctx context.Context, params ReadFatherCatParams) (ReadFatherCatRes, error)
	// ReadKitten invokes readKitten operation.
	//
	// Finds the Kitten with the requested ID and returns it.
	//
	// GET /kitten/{id}
	ReadKitten(ctx context.Context, params ReadKittenParams) (ReadKittenRes, error)
	// UpdateBreed invokes updateBreed operation.
	//
	// Update Breed  and persists it to storage.
	//
	// PUT /breed/{id}
	UpdateBreed(ctx context.Context, request *UpdateBreed, params UpdateBreedParams) (UpdateBreedRes, error)
	// UpdateCat invokes updateCat operation.
	//
	// Update Cat  and persists it to storage.
	//
	// PUT /cat/{id}
	UpdateCat(ctx context.Context, request *UpdateCat, params UpdateCatParams) (UpdateCatRes, error)
	// UpdateFatherCat invokes updateFatherCat operation.
	//
	// Update FatherCat  and persists it to storage.
	//
	// PUT /fathercat/{id}
	UpdateFatherCat(ctx context.Context, request *UpdateFatherCat, params UpdateFatherCatParams) (UpdateFatherCatRes, error)
	// UpdateKitten invokes updateKitten operation.
	//
	// Update Kitten  and persists it to storage.
	//
	// PUT /kitten/{id}
	UpdateKitten(ctx context.Context, request *UpdateKitten, params UpdateKittenParams) (UpdateKittenRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type Kitten

type Kitten struct {
	CreateTime  time.Time   `json:"create_time"`
	DeletedTime OptDateTime `json:"deleted_time"`
	Edges       KittenEdges `json:"edges"`
	ID          uuid.UUID   `json:"id"`
	MotherID    uuid.UUID   `json:"mother_id"`
	Name        string      `json:"name"`
	UpdateTime  time.Time   `json:"update_time"`
}

Ref: #/components/schemas/Kitten

func NewKitten

func NewKitten(e service.Kitten) Kitten

func NewKittenList

func NewKittenList(es []service.Kitten) []Kitten

func (*Kitten) Decode

func (s *Kitten) Decode(d *jx.Decoder) error

Decode decodes Kitten from json.

func (*Kitten) Encode

func (s *Kitten) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Kitten) GetCreateTime

func (s *Kitten) GetCreateTime() time.Time

GetCreateTime returns the value of CreateTime.

func (*Kitten) GetDeletedTime

func (s *Kitten) GetDeletedTime() OptDateTime

GetDeletedTime returns the value of DeletedTime.

func (*Kitten) GetEdges

func (s *Kitten) GetEdges() KittenEdges

GetEdges returns the value of Edges.

func (*Kitten) GetID

func (s *Kitten) GetID() uuid.UUID

GetID returns the value of ID.

func (*Kitten) GetMotherID

func (s *Kitten) GetMotherID() uuid.UUID

GetMotherID returns the value of MotherID.

func (*Kitten) GetName

func (s *Kitten) GetName() string

GetName returns the value of Name.

func (*Kitten) GetUpdateTime

func (s *Kitten) GetUpdateTime() time.Time

GetUpdateTime returns the value of UpdateTime.

func (*Kitten) MarshalJSON

func (s *Kitten) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Kitten) SetCreateTime

func (s *Kitten) SetCreateTime(val time.Time)

SetCreateTime sets the value of CreateTime.

func (*Kitten) SetDeletedTime

func (s *Kitten) SetDeletedTime(val OptDateTime)

SetDeletedTime sets the value of DeletedTime.

func (*Kitten) SetEdges

func (s *Kitten) SetEdges(val KittenEdges)

SetEdges sets the value of Edges.

func (*Kitten) SetID

func (s *Kitten) SetID(val uuid.UUID)

SetID sets the value of ID.

func (*Kitten) SetMotherID

func (s *Kitten) SetMotherID(val uuid.UUID)

SetMotherID sets the value of MotherID.

func (*Kitten) SetName

func (s *Kitten) SetName(val string)

SetName sets the value of Name.

func (*Kitten) SetUpdateTime

func (s *Kitten) SetUpdateTime(val time.Time)

SetUpdateTime sets the value of UpdateTime.

func (*Kitten) UnmarshalJSON

func (s *Kitten) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type KittenEdges

type KittenEdges struct {
	Mother OptCat `json:"mother"`
}

func (*KittenEdges) Decode

func (s *KittenEdges) Decode(d *jx.Decoder) error

Decode decodes KittenEdges from json.

func (*KittenEdges) Encode

func (s *KittenEdges) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*KittenEdges) GetMother

func (s *KittenEdges) GetMother() OptCat

GetMother returns the value of Mother.

func (*KittenEdges) MarshalJSON

func (s *KittenEdges) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*KittenEdges) SetMother

func (s *KittenEdges) SetMother(val OptCat)

SetMother sets the value of Mother.

func (*KittenEdges) UnmarshalJSON

func (s *KittenEdges) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type KittenList

type KittenList []Kitten

func (*KittenList) Decode

func (s *KittenList) Decode(d *jx.Decoder) error

Decode decodes KittenList from json.

func (KittenList) Encode

func (s KittenList) Encode(e *jx.Encoder)

Encode encodes KittenList as json.

func (KittenList) MarshalJSON

func (s KittenList) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*KittenList) UnmarshalJSON

func (s *KittenList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (KittenList) Validate

func (s KittenList) Validate() error

type KittenListHeaders

type KittenListHeaders struct {
	ContentRange int
	Response     KittenList
}

KittenListHeaders wraps KittenList with response headers.

func (*KittenListHeaders) GetContentRange

func (s *KittenListHeaders) GetContentRange() int

GetContentRange returns the value of ContentRange.

func (*KittenListHeaders) GetResponse

func (s *KittenListHeaders) GetResponse() KittenList

GetResponse returns the value of Response.

func (*KittenListHeaders) SetContentRange

func (s *KittenListHeaders) SetContentRange(val int)

SetContentRange sets the value of ContentRange.

func (*KittenListHeaders) SetResponse

func (s *KittenListHeaders) SetResponse(val KittenList)

SetResponse sets the value of Response.

func (*KittenListHeaders) Validate

func (s *KittenListHeaders) Validate() error

type ListBreedBadRequestApplicationJSON

type ListBreedBadRequestApplicationJSON []R400Item

func (*ListBreedBadRequestApplicationJSON) Decode

Decode decodes ListBreedBadRequestApplicationJSON from json.

func (ListBreedBadRequestApplicationJSON) Encode

Encode encodes ListBreedBadRequestApplicationJSON as json.

func (ListBreedBadRequestApplicationJSON) MarshalJSON

func (s ListBreedBadRequestApplicationJSON) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListBreedBadRequestApplicationJSON) UnmarshalJSON

func (s *ListBreedBadRequestApplicationJSON) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (ListBreedBadRequestApplicationJSON) Validate

type ListBreedConflictApplicationJSON

type ListBreedConflictApplicationJSON []R409Item

func (*ListBreedConflictApplicationJSON) Decode

Decode decodes ListBreedConflictApplicationJSON from json.

func (ListBreedConflictApplicationJSON) Encode

Encode encodes ListBreedConflictApplicationJSON as json.

func (ListBreedConflictApplicationJSON) MarshalJSON

func (s ListBreedConflictApplicationJSON) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListBreedConflictApplicationJSON) UnmarshalJSON

func (s *ListBreedConflictApplicationJSON) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (ListBreedConflictApplicationJSON) Validate

type ListBreedInternalServerErrorApplicationJSON

type ListBreedInternalServerErrorApplicationJSON []R500Item

func (*ListBreedInternalServerErrorApplicationJSON) Decode

Decode decodes ListBreedInternalServerErrorApplicationJSON from json.

func (ListBreedInternalServerErrorApplicationJSON) Encode

Encode encodes ListBreedInternalServerErrorApplicationJSON as json.

func (ListBreedInternalServerErrorApplicationJSON) MarshalJSON

MarshalJSON implements stdjson.Marshaler.

func (*ListBreedInternalServerErrorApplicationJSON) UnmarshalJSON

func (s *ListBreedInternalServerErrorApplicationJSON) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (ListBreedInternalServerErrorApplicationJSON) Validate

type ListBreedNotFoundApplicationJSON

type ListBreedNotFoundApplicationJSON []R404Item

func (*ListBreedNotFoundApplicationJSON) Decode

Decode decodes ListBreedNotFoundApplicationJSON from json.

func (ListBreedNotFoundApplicationJSON) Encode

Encode encodes ListBreedNotFoundApplicationJSON as json.

func (ListBreedNotFoundApplicationJSON) MarshalJSON

func (s ListBreedNotFoundApplicationJSON) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListBreedNotFoundApplicationJSON) UnmarshalJSON

func (s *ListBreedNotFoundApplicationJSON) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (ListBreedNotFoundApplicationJSON) Validate

type ListBreedParams

type ListBreedParams struct {
	// What page to render.
	Page OptInt
	// Item count to render per page.
	ItemsPerPage OptInt
	// Filter by Cat relation id.
	FilterCatsId OptUUID
	// Return result with edges. accesible first level edges: cats; nested edges format: entity.edge,
	// entity.edge.second_level_edge.
	With OptString
}

ListBreedParams is parameters of listBreed operation.

type ListBreedRes

type ListBreedRes interface {
	// contains filtered or unexported methods
}

type ListCatParams

type ListCatParams struct {
	// What page to render.
	Page OptInt
	// Item count to render per page.
	ItemsPerPage OptInt
	// Filter by Kitten relation id.
	FilterKittensId OptUUID
	// Filter by Breed relation id.
	FilterBreedId OptUUID
	// Return result with edges. accesible first level edges: kittens, breed; nested edges format: entity.
	// edge,entity.edge.second_level_edge.
	With OptString
}

ListCatParams is parameters of listCat operation.

type ListCatRes

type ListCatRes interface {
	// contains filtered or unexported methods
}

type ListFatherCatParams

type ListFatherCatParams struct {
	// What page to render.
	Page OptInt
	// Item count to render per page.
	ItemsPerPage OptInt
}

ListFatherCatParams is parameters of listFatherCat operation.

type ListFatherCatRes

type ListFatherCatRes interface {
	// contains filtered or unexported methods
}

type ListKittenParams

type ListKittenParams struct {
	// What page to render.
	Page OptInt
	// Item count to render per page.
	ItemsPerPage OptInt
	// Filter by Cat relation id.
	FilterMotherId OptUUID
	// Return result with edges. accesible first level edges: mother; nested edges format: entity.edge,
	// entity.edge.second_level_edge.
	With OptString
}

ListKittenParams is parameters of listKitten operation.

type ListKittenRes

type ListKittenRes interface {
	// contains filtered or unexported methods
}

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OptBreed

type OptBreed struct {
	Value Breed
	Set   bool
}

OptBreed is optional Breed.

func NewOptBreed

func NewOptBreed(v Breed) OptBreed

NewOptBreed returns new OptBreed with value set to v.

func (*OptBreed) Decode

func (o *OptBreed) Decode(d *jx.Decoder) error

Decode decodes Breed from json.

func (OptBreed) Encode

func (o OptBreed) Encode(e *jx.Encoder)

Encode encodes Breed as json.

func (OptBreed) Get

func (o OptBreed) Get() (v Breed, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptBreed) IsSet

func (o OptBreed) IsSet() bool

IsSet returns true if OptBreed was set.

func (OptBreed) MarshalJSON

func (s OptBreed) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptBreed) Or

func (o OptBreed) Or(d Breed) Breed

Or returns value if set, or given parameter if does not.

func (*OptBreed) Reset

func (o *OptBreed) Reset()

Reset unsets value.

func (*OptBreed) SetTo

func (o *OptBreed) SetTo(v Breed)

SetTo sets value to v.

func (*OptBreed) UnmarshalJSON

func (s *OptBreed) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptCat

type OptCat struct {
	Value Cat
	Set   bool
}

OptCat is optional Cat.

func NewOptCat

func NewOptCat(v Cat) OptCat

NewOptCat returns new OptCat with value set to v.

func (*OptCat) Decode

func (o *OptCat) Decode(d *jx.Decoder) error

Decode decodes Cat from json.

func (OptCat) Encode

func (o OptCat) Encode(e *jx.Encoder)

Encode encodes Cat as json.

func (OptCat) Get

func (o OptCat) Get() (v Cat, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptCat) IsSet

func (o OptCat) IsSet() bool

IsSet returns true if OptCat was set.

func (OptCat) MarshalJSON

func (s OptCat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptCat) Or

func (o OptCat) Or(d Cat) Cat

Or returns value if set, or given parameter if does not.

func (*OptCat) Reset

func (o *OptCat) Reset()

Reset unsets value.

func (*OptCat) SetTo

func (o *OptCat) SetTo(v Cat)

SetTo sets value to v.

func (*OptCat) UnmarshalJSON

func (s *OptCat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptCreateBreed

type OptCreateBreed struct {
	Value CreateBreed
	Set   bool
}

OptCreateBreed is optional CreateBreed.

func NewOptCreateBreed

func NewOptCreateBreed(v CreateBreed) OptCreateBreed

NewOptCreateBreed returns new OptCreateBreed with value set to v.

func (*OptCreateBreed) Decode

func (o *OptCreateBreed) Decode(d *jx.Decoder) error

Decode decodes CreateBreed from json.

func (OptCreateBreed) Encode

func (o OptCreateBreed) Encode(e *jx.Encoder)

Encode encodes CreateBreed as json.

func (OptCreateBreed) Get

func (o OptCreateBreed) Get() (v CreateBreed, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptCreateBreed) IsSet

func (o OptCreateBreed) IsSet() bool

IsSet returns true if OptCreateBreed was set.

func (OptCreateBreed) MarshalJSON

func (s OptCreateBreed) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptCreateBreed) Or

Or returns value if set, or given parameter if does not.

func (*OptCreateBreed) Reset

func (o *OptCreateBreed) Reset()

Reset unsets value.

func (*OptCreateBreed) SetTo

func (o *OptCreateBreed) SetTo(v CreateBreed)

SetTo sets value to v.

func (*OptCreateBreed) UnmarshalJSON

func (s *OptCreateBreed) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptCreateBreedEdges

type OptCreateBreedEdges struct {
	Value CreateBreedEdges
	Set   bool
}

OptCreateBreedEdges is optional CreateBreedEdges.

func NewOptCreateBreedEdges

func NewOptCreateBreedEdges(v CreateBreedEdges) OptCreateBreedEdges

NewOptCreateBreedEdges returns new OptCreateBreedEdges with value set to v.

func (*OptCreateBreedEdges) Decode

func (o *OptCreateBreedEdges) Decode(d *jx.Decoder) error

Decode decodes CreateBreedEdges from json.

func (OptCreateBreedEdges) Encode

func (o OptCreateBreedEdges) Encode(e *jx.Encoder)

Encode encodes CreateBreedEdges as json.

func (OptCreateBreedEdges) Get

func (o OptCreateBreedEdges) Get() (v CreateBreedEdges, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptCreateBreedEdges) IsSet

func (o OptCreateBreedEdges) IsSet() bool

IsSet returns true if OptCreateBreedEdges was set.

func (OptCreateBreedEdges) MarshalJSON

func (s OptCreateBreedEdges) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptCreateBreedEdges) Or

Or returns value if set, or given parameter if does not.

func (*OptCreateBreedEdges) Reset

func (o *OptCreateBreedEdges) Reset()

Reset unsets value.

func (*OptCreateBreedEdges) SetTo

SetTo sets value to v.

func (*OptCreateBreedEdges) UnmarshalJSON

func (s *OptCreateBreedEdges) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptCreateCat

type OptCreateCat struct {
	Value CreateCat
	Set   bool
}

OptCreateCat is optional CreateCat.

func NewOptCreateCat

func NewOptCreateCat(v CreateCat) OptCreateCat

NewOptCreateCat returns new OptCreateCat with value set to v.

func (*OptCreateCat) Decode

func (o *OptCreateCat) Decode(d *jx.Decoder) error

Decode decodes CreateCat from json.

func (OptCreateCat) Encode

func (o OptCreateCat) Encode(e *jx.Encoder)

Encode encodes CreateCat as json.

func (OptCreateCat) Get

func (o OptCreateCat) Get() (v CreateCat, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptCreateCat) IsSet

func (o OptCreateCat) IsSet() bool

IsSet returns true if OptCreateCat was set.

func (OptCreateCat) MarshalJSON

func (s OptCreateCat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptCreateCat) Or

Or returns value if set, or given parameter if does not.

func (*OptCreateCat) Reset

func (o *OptCreateCat) Reset()

Reset unsets value.

func (*OptCreateCat) SetTo

func (o *OptCreateCat) SetTo(v CreateCat)

SetTo sets value to v.

func (*OptCreateCat) UnmarshalJSON

func (s *OptCreateCat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptCreateCatEdges

type OptCreateCatEdges struct {
	Value CreateCatEdges
	Set   bool
}

OptCreateCatEdges is optional CreateCatEdges.

func NewOptCreateCatEdges

func NewOptCreateCatEdges(v CreateCatEdges) OptCreateCatEdges

NewOptCreateCatEdges returns new OptCreateCatEdges with value set to v.

func (*OptCreateCatEdges) Decode

func (o *OptCreateCatEdges) Decode(d *jx.Decoder) error

Decode decodes CreateCatEdges from json.

func (OptCreateCatEdges) Encode

func (o OptCreateCatEdges) Encode(e *jx.Encoder)

Encode encodes CreateCatEdges as json.

func (OptCreateCatEdges) Get

func (o OptCreateCatEdges) Get() (v CreateCatEdges, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptCreateCatEdges) IsSet

func (o OptCreateCatEdges) IsSet() bool

IsSet returns true if OptCreateCatEdges was set.

func (OptCreateCatEdges) MarshalJSON

func (s OptCreateCatEdges) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptCreateCatEdges) Or

Or returns value if set, or given parameter if does not.

func (*OptCreateCatEdges) Reset

func (o *OptCreateCatEdges) Reset()

Reset unsets value.

func (*OptCreateCatEdges) SetTo

func (o *OptCreateCatEdges) SetTo(v CreateCatEdges)

SetTo sets value to v.

func (*OptCreateCatEdges) UnmarshalJSON

func (s *OptCreateCatEdges) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptCreateKittenEdges

type OptCreateKittenEdges struct {
	Value CreateKittenEdges
	Set   bool
}

OptCreateKittenEdges is optional CreateKittenEdges.

func NewOptCreateKittenEdges

func NewOptCreateKittenEdges(v CreateKittenEdges) OptCreateKittenEdges

NewOptCreateKittenEdges returns new OptCreateKittenEdges with value set to v.

func (*OptCreateKittenEdges) Decode

func (o *OptCreateKittenEdges) Decode(d *jx.Decoder) error

Decode decodes CreateKittenEdges from json.

func (OptCreateKittenEdges) Encode

func (o OptCreateKittenEdges) Encode(e *jx.Encoder)

Encode encodes CreateKittenEdges as json.

func (OptCreateKittenEdges) Get

Get returns value and boolean that denotes whether value was set.

func (OptCreateKittenEdges) IsSet

func (o OptCreateKittenEdges) IsSet() bool

IsSet returns true if OptCreateKittenEdges was set.

func (OptCreateKittenEdges) MarshalJSON

func (s OptCreateKittenEdges) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptCreateKittenEdges) Or

Or returns value if set, or given parameter if does not.

func (*OptCreateKittenEdges) Reset

func (o *OptCreateKittenEdges) Reset()

Reset unsets value.

func (*OptCreateKittenEdges) SetTo

SetTo sets value to v.

func (*OptCreateKittenEdges) UnmarshalJSON

func (s *OptCreateKittenEdges) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptDate

type OptDate struct {
	Value time.Time
	Set   bool
}

OptDate is optional time.Time.

func NewOptDate

func NewOptDate(v time.Time) OptDate

NewOptDate returns new OptDate with value set to v.

func (*OptDate) Decode

func (o *OptDate) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error

Decode decodes time.Time from json.

func (OptDate) Encode

func (o OptDate) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))

Encode encodes time.Time as json.

func (OptDate) Get

func (o OptDate) Get() (v time.Time, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptDate) IsSet

func (o OptDate) IsSet() bool

IsSet returns true if OptDate was set.

func (OptDate) MarshalJSON

func (s OptDate) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptDate) Or

func (o OptDate) Or(d time.Time) time.Time

Or returns value if set, or given parameter if does not.

func (*OptDate) Reset

func (o *OptDate) Reset()

Reset unsets value.

func (*OptDate) SetTo

func (o *OptDate) SetTo(v time.Time)

SetTo sets value to v.

func (*OptDate) UnmarshalJSON

func (s *OptDate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptDateTime

type OptDateTime struct {
	Value time.Time
	Set   bool
}

OptDateTime is optional time.Time.

func NewOptDateTime

func NewOptDateTime(v time.Time) OptDateTime

NewOptDateTime returns new OptDateTime with value set to v.

func (*OptDateTime) Decode

func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error

Decode decodes time.Time from json.

func (OptDateTime) Encode

func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))

Encode encodes time.Time as json.

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) Reset

func (o *OptDateTime) Reset()

Reset unsets value.

func (*OptDateTime) SetTo

func (o *OptDateTime) SetTo(v time.Time)

SetTo sets value to v.

func (*OptDateTime) UnmarshalJSON

func (s *OptDateTime) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt

type OptInt struct {
	Value int
	Set   bool
}

OptInt is optional int.

func NewOptInt

func NewOptInt(v int) OptInt

NewOptInt returns new OptInt with value set to v.

func (OptInt) Get

func (o OptInt) Get() (v int, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt) IsSet

func (o OptInt) IsSet() bool

IsSet returns true if OptInt was set.

func (OptInt) Or

func (o OptInt) Or(d int) int

Or returns value if set, or given parameter if does not.

func (*OptInt) Reset

func (o *OptInt) Reset()

Reset unsets value.

func (*OptInt) SetTo

func (o *OptInt) SetTo(v int)

SetTo sets value to v.

type OptInt64

type OptInt64 struct {
	Value int64
	Set   bool
}

OptInt64 is optional int64.

func NewOptInt64

func NewOptInt64(v int64) OptInt64

NewOptInt64 returns new OptInt64 with value set to v.

func (*OptInt64) Decode

func (o *OptInt64) Decode(d *jx.Decoder) error

Decode decodes int64 from json.

func (OptInt64) Encode

func (o OptInt64) Encode(e *jx.Encoder)

Encode encodes int64 as json.

func (OptInt64) Get

func (o OptInt64) Get() (v int64, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt64) IsSet

func (o OptInt64) IsSet() bool

IsSet returns true if OptInt64 was set.

func (OptInt64) MarshalJSON

func (s OptInt64) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt64) Or

func (o OptInt64) Or(d int64) int64

Or returns value if set, or given parameter if does not.

func (*OptInt64) Reset

func (o *OptInt64) Reset()

Reset unsets value.

func (*OptInt64) SetTo

func (o *OptInt64) SetTo(v int64)

SetTo sets value to v.

func (*OptInt64) UnmarshalJSON

func (s *OptInt64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptUUID

type OptUUID struct {
	Value uuid.UUID
	Set   bool
}

OptUUID is optional uuid.UUID.

func NewOptUUID

func NewOptUUID(v uuid.UUID) OptUUID

NewOptUUID returns new OptUUID with value set to v.

func (*OptUUID) Decode

func (o *OptUUID) Decode(d *jx.Decoder) error

Decode decodes uuid.UUID from json.

func (OptUUID) Encode

func (o OptUUID) Encode(e *jx.Encoder)

Encode encodes uuid.UUID as json.

func (OptUUID) Get

func (o OptUUID) Get() (v uuid.UUID, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptUUID) IsSet

func (o OptUUID) IsSet() bool

IsSet returns true if OptUUID was set.

func (OptUUID) MarshalJSON

func (s OptUUID) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptUUID) Or

func (o OptUUID) Or(d uuid.UUID) uuid.UUID

Or returns value if set, or given parameter if does not.

func (*OptUUID) Reset

func (o *OptUUID) Reset()

Reset unsets value.

func (*OptUUID) SetTo

func (o *OptUUID) SetTo(v uuid.UUID)

SetTo sets value to v.

func (*OptUUID) UnmarshalJSON

func (s *OptUUID) UnmarshalJSON(data []byte) error

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 otel.GetMeterProvider() 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 R400Item

type R400Item struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func (*R400Item) Decode

func (s *R400Item) Decode(d *jx.Decoder) error

Decode decodes R400Item from json.

func (*R400Item) Encode

func (s *R400Item) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*R400Item) GetCode

func (s *R400Item) GetCode() int

GetCode returns the value of Code.

func (*R400Item) GetMessage

func (s *R400Item) GetMessage() string

GetMessage returns the value of Message.

func (*R400Item) MarshalJSON

func (s *R400Item) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*R400Item) SetCode

func (s *R400Item) SetCode(val int)

SetCode sets the value of Code.

func (*R400Item) SetMessage

func (s *R400Item) SetMessage(val string)

SetMessage sets the value of Message.

func (*R400Item) UnmarshalJSON

func (s *R400Item) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type R404Item

type R404Item struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func (*R404Item) Decode

func (s *R404Item) Decode(d *jx.Decoder) error

Decode decodes R404Item from json.

func (*R404Item) Encode

func (s *R404Item) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*R404Item) GetCode

func (s *R404Item) GetCode() int

GetCode returns the value of Code.

func (*R404Item) GetMessage

func (s *R404Item) GetMessage() string

GetMessage returns the value of Message.

func (*R404Item) MarshalJSON

func (s *R404Item) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*R404Item) SetCode

func (s *R404Item) SetCode(val int)

SetCode sets the value of Code.

func (*R404Item) SetMessage

func (s *R404Item) SetMessage(val string)

SetMessage sets the value of Message.

func (*R404Item) UnmarshalJSON

func (s *R404Item) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type R409Item

type R409Item struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func (*R409Item) Decode

func (s *R409Item) Decode(d *jx.Decoder) error

Decode decodes R409Item from json.

func (*R409Item) Encode

func (s *R409Item) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*R409Item) GetCode

func (s *R409Item) GetCode() int

GetCode returns the value of Code.

func (*R409Item) GetMessage

func (s *R409Item) GetMessage() string

GetMessage returns the value of Message.

func (*R409Item) MarshalJSON

func (s *R409Item) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*R409Item) SetCode

func (s *R409Item) SetCode(val int)

SetCode sets the value of Code.

func (*R409Item) SetMessage

func (s *R409Item) SetMessage(val string)

SetMessage sets the value of Message.

func (*R409Item) UnmarshalJSON

func (s *R409Item) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type R500Item

type R500Item struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func (*R500Item) Decode

func (s *R500Item) Decode(d *jx.Decoder) error

Decode decodes R500Item from json.

func (*R500Item) Encode

func (s *R500Item) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*R500Item) GetCode

func (s *R500Item) GetCode() int

GetCode returns the value of Code.

func (*R500Item) GetMessage

func (s *R500Item) GetMessage() string

GetMessage returns the value of Message.

func (*R500Item) MarshalJSON

func (s *R500Item) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*R500Item) SetCode

func (s *R500Item) SetCode(val int)

SetCode sets the value of Code.

func (*R500Item) SetMessage

func (s *R500Item) SetMessage(val string)

SetMessage sets the value of Message.

func (*R500Item) UnmarshalJSON

func (s *R500Item) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ReadBreedParams

type ReadBreedParams struct {
	// ID of the Breed.
	ID uuid.UUID
	// Return result with edges. accesible first level edges: cats; nested edges format: entity.edge,
	// entity.edge.second_level_edge.
	With OptString
}

ReadBreedParams is parameters of readBreed operation.

type ReadBreedRes

type ReadBreedRes interface {
	// contains filtered or unexported methods
}

type ReadCatParams

type ReadCatParams struct {
	// ID of the Cat.
	ID uuid.UUID
	// Return result with edges. accesible first level edges: kittens, breed; nested edges format: entity.
	// edge,entity.edge.second_level_edge.
	With OptString
}

ReadCatParams is parameters of readCat operation.

type ReadCatRes

type ReadCatRes interface {
	// contains filtered or unexported methods
}

type ReadFatherCatParams

type ReadFatherCatParams struct {
	// ID of the FatherCat.
	ID uuid.UUID
}

ReadFatherCatParams is parameters of readFatherCat operation.

type ReadFatherCatRes

type ReadFatherCatRes interface {
	// contains filtered or unexported methods
}

type ReadKittenParams

type ReadKittenParams struct {
	// ID of the Kitten.
	ID uuid.UUID
	// Return result with edges. accesible first level edges: mother; nested edges format: entity.edge,
	// entity.edge.second_level_edge.
	With OptString
}

ReadKittenParams is parameters of readKitten operation.

type ReadKittenRes

type ReadKittenRes interface {
	// contains filtered or unexported methods
}

type Route

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

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

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.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

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) CreateBreed

func (UnimplementedHandler) CreateBreed(ctx context.Context, req *CreateBreed) (r CreateBreedRes, _ error)

CreateBreed implements createBreed operation.

Create a new Breed and persists it to storage.

POST /breed

func (UnimplementedHandler) CreateCat

func (UnimplementedHandler) CreateCat(ctx context.Context, req *CreateCat) (r CreateCatRes, _ error)

CreateCat implements createCat operation.

Create a new Cat and persists it to storage.

POST /cat

func (UnimplementedHandler) CreateFatherCat

func (UnimplementedHandler) CreateFatherCat(ctx context.Context, req *CreateFatherCat) (r CreateFatherCatRes, _ error)

CreateFatherCat implements createFatherCat operation.

Create a new FatherCat and persists it to storage.

POST /fathercat

func (UnimplementedHandler) CreateKitten

func (UnimplementedHandler) CreateKitten(ctx context.Context, req *CreateKitten) (r CreateKittenRes, _ error)

CreateKitten implements createKitten operation.

Create a new Kitten and persists it to storage.

POST /kitten

func (UnimplementedHandler) DeleteBreed

DeleteBreed implements deleteBreed operation.

Delete Breed.

DELETE /breed/{id}

func (UnimplementedHandler) DeleteCat

func (UnimplementedHandler) DeleteCat(ctx context.Context, params DeleteCatParams) (r DeleteCatRes, _ error)

DeleteCat implements deleteCat operation.

Delete Cat.

DELETE /cat/{id}

func (UnimplementedHandler) DeleteFatherCat

DeleteFatherCat implements deleteFatherCat operation.

Delete FatherCat.

DELETE /fathercat/{id}

func (UnimplementedHandler) DeleteKitten

DeleteKitten implements deleteKitten operation.

Delete Kitten.

DELETE /kitten/{id}

func (UnimplementedHandler) ListBreed

func (UnimplementedHandler) ListBreed(ctx context.Context, params ListBreedParams) (r ListBreedRes, _ error)

ListBreed implements listBreed operation.

List for Breeds.

GET /breed

func (UnimplementedHandler) ListCat

func (UnimplementedHandler) ListCat(ctx context.Context, params ListCatParams) (r ListCatRes, _ error)

ListCat implements listCat operation.

List for Cats.

GET /cat

func (UnimplementedHandler) ListFatherCat

ListFatherCat implements listFatherCat operation.

List for FatherCats.

GET /fathercat

func (UnimplementedHandler) ListKitten

ListKitten implements listKitten operation.

List for Kittens.

GET /kitten

func (UnimplementedHandler) NewError

func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)

NewError creates *ErrorStatusCode from error returned by handler.

Used for common default response.

func (UnimplementedHandler) ReadBreed

func (UnimplementedHandler) ReadBreed(ctx context.Context, params ReadBreedParams) (r ReadBreedRes, _ error)

ReadBreed implements readBreed operation.

Finds the Breed with the requested ID and returns it.

GET /breed/{id}

func (UnimplementedHandler) ReadCat

func (UnimplementedHandler) ReadCat(ctx context.Context, params ReadCatParams) (r ReadCatRes, _ error)

ReadCat implements readCat operation.

Finds the Cat with the requested ID and returns it.

GET /cat/{id}

func (UnimplementedHandler) ReadFatherCat

ReadFatherCat implements readFatherCat operation.

Finds the FatherCat with the requested ID and returns it.

GET /fathercat/{id}

func (UnimplementedHandler) ReadKitten

ReadKitten implements readKitten operation.

Finds the Kitten with the requested ID and returns it.

GET /kitten/{id}

func (UnimplementedHandler) UpdateBreed

UpdateBreed implements updateBreed operation.

Update Breed and persists it to storage.

PUT /breed/{id}

func (UnimplementedHandler) UpdateCat

func (UnimplementedHandler) UpdateCat(ctx context.Context, req *UpdateCat, params UpdateCatParams) (r UpdateCatRes, _ error)

UpdateCat implements updateCat operation.

Update Cat and persists it to storage.

PUT /cat/{id}

func (UnimplementedHandler) UpdateFatherCat

UpdateFatherCat implements updateFatherCat operation.

Update FatherCat and persists it to storage.

PUT /fathercat/{id}

func (UnimplementedHandler) UpdateKitten

UpdateKitten implements updateKitten operation.

Update Kitten and persists it to storage.

PUT /kitten/{id}

type UpdateBreed

type UpdateBreed struct {
	CreateTime  OptDateTime `json:"create_time"`
	DeletedTime OptDateTime `json:"deleted_time"`
	EdgesDelete OptUUID     `json:"edges_delete"`
	ID          OptUUID     `json:"id"`
	Name        OptString   `json:"name"`
	UpdateTime  OptDateTime `json:"update_time"`
}

Ref: #/components/schemas/UpdateBreed

func (*UpdateBreed) Decode

func (s *UpdateBreed) Decode(d *jx.Decoder) error

Decode decodes UpdateBreed from json.

func (*UpdateBreed) Encode

func (s *UpdateBreed) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UpdateBreed) GetCreateTime

func (s *UpdateBreed) GetCreateTime() OptDateTime

GetCreateTime returns the value of CreateTime.

func (*UpdateBreed) GetDeletedTime

func (s *UpdateBreed) GetDeletedTime() OptDateTime

GetDeletedTime returns the value of DeletedTime.

func (*UpdateBreed) GetEdgesDelete

func (s *UpdateBreed) GetEdgesDelete() OptUUID

GetEdgesDelete returns the value of EdgesDelete.

func (*UpdateBreed) GetID

func (s *UpdateBreed) GetID() OptUUID

GetID returns the value of ID.

func (*UpdateBreed) GetName

func (s *UpdateBreed) GetName() OptString

GetName returns the value of Name.

func (*UpdateBreed) GetUpdateTime

func (s *UpdateBreed) GetUpdateTime() OptDateTime

GetUpdateTime returns the value of UpdateTime.

func (*UpdateBreed) MarshalJSON

func (s *UpdateBreed) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UpdateBreed) SetCreateTime

func (s *UpdateBreed) SetCreateTime(val OptDateTime)

SetCreateTime sets the value of CreateTime.

func (*UpdateBreed) SetDeletedTime

func (s *UpdateBreed) SetDeletedTime(val OptDateTime)

SetDeletedTime sets the value of DeletedTime.

func (*UpdateBreed) SetEdgesDelete

func (s *UpdateBreed) SetEdgesDelete(val OptUUID)

SetEdgesDelete sets the value of EdgesDelete.

func (*UpdateBreed) SetID

func (s *UpdateBreed) SetID(val OptUUID)

SetID sets the value of ID.

func (*UpdateBreed) SetName

func (s *UpdateBreed) SetName(val OptString)

SetName sets the value of Name.

func (*UpdateBreed) SetUpdateTime

func (s *UpdateBreed) SetUpdateTime(val OptDateTime)

SetUpdateTime sets the value of UpdateTime.

func (*UpdateBreed) UnmarshalJSON

func (s *UpdateBreed) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UpdateBreedParams

type UpdateBreedParams struct {
	// ID of the Breed.
	ID uuid.UUID
}

UpdateBreedParams is parameters of updateBreed operation.

type UpdateBreedRes

type UpdateBreedRes interface {
	// contains filtered or unexported methods
}

type UpdateCat

type UpdateCat struct {
	PhantomField OptString   `json:"PhantomField"`
	BreedID      OptUUID     `json:"breed_id"`
	CreateTime   OptDateTime `json:"create_time"`
	DateFrom     OptDate     `json:"date_from"`
	DeletedTime  OptDateTime `json:"deleted_time"`
	EdgesDelete  OptUUID     `json:"edges_delete"`
	ID           OptUUID     `json:"id"`
	Name         OptString   `json:"name"`
	OtherType    OptString   `json:"other_type"`
	Speed        OptInt64    `json:"speed"`
	Type         OptString   `json:"type"`
	UpdateTime   OptDateTime `json:"update_time"`
}

Ref: #/components/schemas/UpdateCat

func (*UpdateCat) Decode

func (s *UpdateCat) Decode(d *jx.Decoder) error

Decode decodes UpdateCat from json.

func (*UpdateCat) Encode

func (s *UpdateCat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UpdateCat) GetBreedID

func (s *UpdateCat) GetBreedID() OptUUID

GetBreedID returns the value of BreedID.

func (*UpdateCat) GetCreateTime

func (s *UpdateCat) GetCreateTime() OptDateTime

GetCreateTime returns the value of CreateTime.

func (*UpdateCat) GetDateFrom

func (s *UpdateCat) GetDateFrom() OptDate

GetDateFrom returns the value of DateFrom.

func (*UpdateCat) GetDeletedTime

func (s *UpdateCat) GetDeletedTime() OptDateTime

GetDeletedTime returns the value of DeletedTime.

func (*UpdateCat) GetEdgesDelete

func (s *UpdateCat) GetEdgesDelete() OptUUID

GetEdgesDelete returns the value of EdgesDelete.

func (*UpdateCat) GetID

func (s *UpdateCat) GetID() OptUUID

GetID returns the value of ID.

func (*UpdateCat) GetName

func (s *UpdateCat) GetName() OptString

GetName returns the value of Name.

func (*UpdateCat) GetOtherType

func (s *UpdateCat) GetOtherType() OptString

GetOtherType returns the value of OtherType.

func (*UpdateCat) GetPhantomField

func (s *UpdateCat) GetPhantomField() OptString

GetPhantomField returns the value of PhantomField.

func (*UpdateCat) GetSpeed

func (s *UpdateCat) GetSpeed() OptInt64

GetSpeed returns the value of Speed.

func (*UpdateCat) GetType

func (s *UpdateCat) GetType() OptString

GetType returns the value of Type.

func (*UpdateCat) GetUpdateTime

func (s *UpdateCat) GetUpdateTime() OptDateTime

GetUpdateTime returns the value of UpdateTime.

func (*UpdateCat) MarshalJSON

func (s *UpdateCat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UpdateCat) SetBreedID

func (s *UpdateCat) SetBreedID(val OptUUID)

SetBreedID sets the value of BreedID.

func (*UpdateCat) SetCreateTime

func (s *UpdateCat) SetCreateTime(val OptDateTime)

SetCreateTime sets the value of CreateTime.

func (*UpdateCat) SetDateFrom

func (s *UpdateCat) SetDateFrom(val OptDate)

SetDateFrom sets the value of DateFrom.

func (*UpdateCat) SetDeletedTime

func (s *UpdateCat) SetDeletedTime(val OptDateTime)

SetDeletedTime sets the value of DeletedTime.

func (*UpdateCat) SetEdgesDelete

func (s *UpdateCat) SetEdgesDelete(val OptUUID)

SetEdgesDelete sets the value of EdgesDelete.

func (*UpdateCat) SetID

func (s *UpdateCat) SetID(val OptUUID)

SetID sets the value of ID.

func (*UpdateCat) SetName

func (s *UpdateCat) SetName(val OptString)

SetName sets the value of Name.

func (*UpdateCat) SetOtherType

func (s *UpdateCat) SetOtherType(val OptString)

SetOtherType sets the value of OtherType.

func (*UpdateCat) SetPhantomField

func (s *UpdateCat) SetPhantomField(val OptString)

SetPhantomField sets the value of PhantomField.

func (*UpdateCat) SetSpeed

func (s *UpdateCat) SetSpeed(val OptInt64)

SetSpeed sets the value of Speed.

func (*UpdateCat) SetType

func (s *UpdateCat) SetType(val OptString)

SetType sets the value of Type.

func (*UpdateCat) SetUpdateTime

func (s *UpdateCat) SetUpdateTime(val OptDateTime)

SetUpdateTime sets the value of UpdateTime.

func (*UpdateCat) UnmarshalJSON

func (s *UpdateCat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UpdateCatParams

type UpdateCatParams struct {
	// ID of the Cat.
	ID uuid.UUID
}

UpdateCatParams is parameters of updateCat operation.

type UpdateCatRes

type UpdateCatRes interface {
	// contains filtered or unexported methods
}

type UpdateFatherCat

type UpdateFatherCat struct {
	CreateTime  OptDateTime `json:"create_time"`
	DeletedTime OptDateTime `json:"deleted_time"`
	ID          OptUUID     `json:"id"`
	Name        OptString   `json:"name"`
	UpdateTime  OptDateTime `json:"update_time"`
}

Ref: #/components/schemas/UpdateFatherCat

func (*UpdateFatherCat) Decode

func (s *UpdateFatherCat) Decode(d *jx.Decoder) error

Decode decodes UpdateFatherCat from json.

func (*UpdateFatherCat) Encode

func (s *UpdateFatherCat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UpdateFatherCat) GetCreateTime

func (s *UpdateFatherCat) GetCreateTime() OptDateTime

GetCreateTime returns the value of CreateTime.

func (*UpdateFatherCat) GetDeletedTime

func (s *UpdateFatherCat) GetDeletedTime() OptDateTime

GetDeletedTime returns the value of DeletedTime.

func (*UpdateFatherCat) GetID

func (s *UpdateFatherCat) GetID() OptUUID

GetID returns the value of ID.

func (*UpdateFatherCat) GetName

func (s *UpdateFatherCat) GetName() OptString

GetName returns the value of Name.

func (*UpdateFatherCat) GetUpdateTime

func (s *UpdateFatherCat) GetUpdateTime() OptDateTime

GetUpdateTime returns the value of UpdateTime.

func (*UpdateFatherCat) MarshalJSON

func (s *UpdateFatherCat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UpdateFatherCat) SetCreateTime

func (s *UpdateFatherCat) SetCreateTime(val OptDateTime)

SetCreateTime sets the value of CreateTime.

func (*UpdateFatherCat) SetDeletedTime

func (s *UpdateFatherCat) SetDeletedTime(val OptDateTime)

SetDeletedTime sets the value of DeletedTime.

func (*UpdateFatherCat) SetID

func (s *UpdateFatherCat) SetID(val OptUUID)

SetID sets the value of ID.

func (*UpdateFatherCat) SetName

func (s *UpdateFatherCat) SetName(val OptString)

SetName sets the value of Name.

func (*UpdateFatherCat) SetUpdateTime

func (s *UpdateFatherCat) SetUpdateTime(val OptDateTime)

SetUpdateTime sets the value of UpdateTime.

func (*UpdateFatherCat) UnmarshalJSON

func (s *UpdateFatherCat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UpdateFatherCatParams

type UpdateFatherCatParams struct {
	// ID of the FatherCat.
	ID uuid.UUID
}

UpdateFatherCatParams is parameters of updateFatherCat operation.

type UpdateFatherCatRes

type UpdateFatherCatRes interface {
	// contains filtered or unexported methods
}

type UpdateKitten

type UpdateKitten struct {
	CreateTime  OptDateTime `json:"create_time"`
	DeletedTime OptDateTime `json:"deleted_time"`
	ID          OptUUID     `json:"id"`
	MotherID    OptUUID     `json:"mother_id"`
	Name        OptString   `json:"name"`
	UpdateTime  OptDateTime `json:"update_time"`
}

Ref: #/components/schemas/UpdateKitten

func (*UpdateKitten) Decode

func (s *UpdateKitten) Decode(d *jx.Decoder) error

Decode decodes UpdateKitten from json.

func (*UpdateKitten) Encode

func (s *UpdateKitten) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UpdateKitten) GetCreateTime

func (s *UpdateKitten) GetCreateTime() OptDateTime

GetCreateTime returns the value of CreateTime.

func (*UpdateKitten) GetDeletedTime

func (s *UpdateKitten) GetDeletedTime() OptDateTime

GetDeletedTime returns the value of DeletedTime.

func (*UpdateKitten) GetID

func (s *UpdateKitten) GetID() OptUUID

GetID returns the value of ID.

func (*UpdateKitten) GetMotherID

func (s *UpdateKitten) GetMotherID() OptUUID

GetMotherID returns the value of MotherID.

func (*UpdateKitten) GetName

func (s *UpdateKitten) GetName() OptString

GetName returns the value of Name.

func (*UpdateKitten) GetUpdateTime

func (s *UpdateKitten) GetUpdateTime() OptDateTime

GetUpdateTime returns the value of UpdateTime.

func (*UpdateKitten) MarshalJSON

func (s *UpdateKitten) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UpdateKitten) SetCreateTime

func (s *UpdateKitten) SetCreateTime(val OptDateTime)

SetCreateTime sets the value of CreateTime.

func (*UpdateKitten) SetDeletedTime

func (s *UpdateKitten) SetDeletedTime(val OptDateTime)

SetDeletedTime sets the value of DeletedTime.

func (*UpdateKitten) SetID

func (s *UpdateKitten) SetID(val OptUUID)

SetID sets the value of ID.

func (*UpdateKitten) SetMotherID

func (s *UpdateKitten) SetMotherID(val OptUUID)

SetMotherID sets the value of MotherID.

func (*UpdateKitten) SetName

func (s *UpdateKitten) SetName(val OptString)

SetName sets the value of Name.

func (*UpdateKitten) SetUpdateTime

func (s *UpdateKitten) SetUpdateTime(val OptDateTime)

SetUpdateTime sets the value of UpdateTime.

func (*UpdateKitten) UnmarshalJSON

func (s *UpdateKitten) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UpdateKittenParams

type UpdateKittenParams struct {
	// ID of the Kitten.
	ID uuid.UUID
}

UpdateKittenParams is parameters of updateKitten operation.

type UpdateKittenRes

type UpdateKittenRes interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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