Documentation
¶
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Client
- type ClientOption
- type ErrorHandler
- type Folder
- type Handler
- type Invoker
- type Labeler
- type Middleware
- type NilString
- func (o *NilString) Decode(d *jx.Decoder) error
- func (o NilString) Encode(e *jx.Encoder)
- func (o NilString) Get() (v string, ok bool)
- func (o NilString) IsNull() bool
- func (s NilString) MarshalJSON() ([]byte, error)
- func (o NilString) Or(d string) string
- func (s *NilString) SetFake()
- func (o *NilString) SetTo(v string)
- func (o *NilString) SetToNull()
- func (s *NilString) UnmarshalJSON(data []byte) error
- type OperationName
- type OptNilDateTime
- func (o *OptNilDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error
- func (o OptNilDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))
- func (o OptNilDateTime) Get() (v time.Time, ok bool)
- func (o OptNilDateTime) IsEmpty() bool
- func (o OptNilDateTime) IsNull() bool
- func (o OptNilDateTime) IsSet() bool
- func (s OptNilDateTime) MarshalJSON() ([]byte, error)
- func (o OptNilDateTime) Or(d time.Time) time.Time
- func (o *OptNilDateTime) Reset()
- func (s *OptNilDateTime) SetFake()
- func (o *OptNilDateTime) SetTo(v time.Time)
- func (o *OptNilDateTime) SetToNull()
- func (s *OptNilDateTime) UnmarshalJSON(data []byte) error
- type OptNilFolder
- func (o *OptNilFolder) Decode(d *jx.Decoder) error
- func (o OptNilFolder) Encode(e *jx.Encoder)
- func (o OptNilFolder) Get() (v Folder, ok bool)
- func (o OptNilFolder) IsEmpty() bool
- func (o OptNilFolder) IsNull() bool
- func (o OptNilFolder) IsSet() bool
- func (s OptNilFolder) MarshalJSON() ([]byte, error)
- func (o OptNilFolder) Or(d Folder) Folder
- func (o *OptNilFolder) Reset()
- func (s *OptNilFolder) SetFake()
- func (o *OptNilFolder) SetTo(v Folder)
- func (o *OptNilFolder) SetToNull()
- func (s *OptNilFolder) UnmarshalJSON(data []byte) error
- type OptNilInt
- func (o *OptNilInt) Decode(d *jx.Decoder) error
- func (o OptNilInt) Encode(e *jx.Encoder)
- func (o OptNilInt) Get() (v int, ok bool)
- func (o OptNilInt) IsEmpty() bool
- func (o OptNilInt) IsNull() bool
- func (o OptNilInt) IsSet() bool
- func (s OptNilInt) MarshalJSON() ([]byte, error)
- func (o OptNilInt) Or(d int) int
- func (o *OptNilInt) Reset()
- func (s *OptNilInt) SetFake()
- func (o *OptNilInt) SetTo(v int)
- func (o *OptNilInt) SetToNull()
- func (s *OptNilInt) UnmarshalJSON(data []byte) error
- type OptNilNilStringArray
- func (o *OptNilNilStringArray) Decode(d *jx.Decoder) error
- func (o OptNilNilStringArray) Encode(e *jx.Encoder)
- func (o OptNilNilStringArray) Get() (v []NilString, ok bool)
- func (o OptNilNilStringArray) IsEmpty() bool
- func (o OptNilNilStringArray) IsNull() bool
- func (o OptNilNilStringArray) IsSet() bool
- func (s OptNilNilStringArray) MarshalJSON() ([]byte, error)
- func (o OptNilNilStringArray) Or(d []NilString) []NilString
- func (o *OptNilNilStringArray) Reset()
- func (s *OptNilNilStringArray) SetFake()
- func (o *OptNilNilStringArray) SetTo(v []NilString)
- func (o *OptNilNilStringArray) SetToNull()
- func (s *OptNilNilStringArray) UnmarshalJSON(data []byte) error
- type OptNilString
- func (o *OptNilString) Decode(d *jx.Decoder) error
- func (o OptNilString) Encode(e *jx.Encoder)
- func (o OptNilString) Get() (v string, ok bool)
- func (o OptNilString) IsEmpty() bool
- func (o OptNilString) IsNull() bool
- func (o OptNilString) IsSet() bool
- func (s OptNilString) MarshalJSON() ([]byte, error)
- func (o OptNilString) Or(d string) string
- func (o *OptNilString) Reset()
- func (s *OptNilString) SetFake()
- func (o *OptNilString) SetTo(v string)
- func (o *OptNilString) SetToNull()
- func (s *OptNilString) UnmarshalJSON(data []byte) error
- type OptNilTemplateStatus
- func (o *OptNilTemplateStatus) Decode(d *jx.Decoder) error
- func (o OptNilTemplateStatus) Encode(e *jx.Encoder)
- func (o OptNilTemplateStatus) Get() (v TemplateStatus, ok bool)
- func (o OptNilTemplateStatus) IsEmpty() bool
- func (o OptNilTemplateStatus) IsNull() bool
- func (o OptNilTemplateStatus) IsSet() bool
- func (s OptNilTemplateStatus) MarshalJSON() ([]byte, error)
- func (o OptNilTemplateStatus) Or(d TemplateStatus) TemplateStatus
- func (o *OptNilTemplateStatus) Reset()
- func (s *OptNilTemplateStatus) SetFake()
- func (o *OptNilTemplateStatus) SetTo(v TemplateStatus)
- func (o *OptNilTemplateStatus) SetToNull()
- func (s *OptNilTemplateStatus) UnmarshalJSON(data []byte) error
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (s *OptString) SetFake()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type Option
- type Route
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type Template
- func (s *Template) Decode(d *jx.Decoder) error
- func (s *Template) Encode(e *jx.Encoder)
- func (s *Template) GetArchivedAt() OptNilDateTime
- func (s *Template) GetAuthorID() OptNilInt
- func (s *Template) GetCreatedAt() time.Time
- func (s *Template) GetFolder() OptNilFolder
- func (s *Template) GetID() int
- func (s *Template) GetSingle() OptString
- func (s *Template) GetSource() OptNilString
- func (s *Template) GetStatus() OptNilTemplateStatus
- func (s *Template) GetTags() OptNilNilStringArray
- func (s *Template) MarshalJSON() ([]byte, error)
- func (s *Template) SetArchivedAt(val OptNilDateTime)
- func (s *Template) SetAuthorID(val OptNilInt)
- func (s *Template) SetCreatedAt(val time.Time)
- func (s *Template) SetFake()
- func (s *Template) SetFolder(val OptNilFolder)
- func (s *Template) SetID(val int)
- func (s *Template) SetSingle(val OptString)
- func (s *Template) SetSource(val OptNilString)
- func (s *Template) SetStatus(val OptNilTemplateStatus)
- func (s *Template) SetTags(val OptNilNilStringArray)
- func (s *Template) UnmarshalJSON(data []byte) error
- func (s *Template) Validate() error
- type TemplateStatus
- func (TemplateStatus) AllValues() []TemplateStatus
- func (s *TemplateStatus) Decode(d *jx.Decoder) error
- func (s TemplateStatus) Encode(e *jx.Encoder)
- func (s TemplateStatus) MarshalJSON() ([]byte, error)
- func (s TemplateStatus) MarshalText() ([]byte, error)
- func (s *TemplateStatus) SetFake()
- func (s *TemplateStatus) UnmarshalJSON(data []byte) error
- func (s *TemplateStatus) UnmarshalText(data []byte) error
- func (s TemplateStatus) Validate() error
- type UnimplementedHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
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.
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 Folder ¶
type Folder struct {
Name string `json:"name"`
}
Ref: #/components/schemas/Folder
func (*Folder) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Folder) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Handler ¶
type Handler interface {
// CreateTemplate implements createTemplate operation.
//
// POST /templates
CreateTemplate(ctx context.Context, req *Template) (*Template, error)
// ListTemplates implements listTemplates operation.
//
// GET /templates
ListTemplates(ctx context.Context) ([]Template, error)
}
Handler handles operations described by OpenAPI v3 specification.
type Invoker ¶
type Invoker interface {
// CreateTemplate invokes createTemplate operation.
//
// POST /templates
CreateTemplate(ctx context.Context, request *Template) (*Template, error)
// ListTemplates invokes listTemplates operation.
//
// GET /templates
ListTemplates(ctx context.Context) ([]Template, error)
}
Invoker invokes operations described by OpenAPI v3 specification.
type Labeler ¶
type Labeler struct {
// contains filtered or unexported fields
}
Labeler is used to allow adding custom attributes to the server request metrics.
func LabelerFromContext ¶
LabelerFromContext retrieves the Labeler from the provided context, if present.
If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.
func (*Labeler) AttributeSet ¶
AttributeSet returns the attributes added to the Labeler as an attribute.Set.
type NilString ¶
NilString is nullable string.
func NewNilString ¶
NewNilString returns new NilString with value set to v.
func (NilString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*NilString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OperationName ¶
type OperationName = string
OperationName is the ogen operation name
const ( CreateTemplateOperation OperationName = "CreateTemplate" ListTemplatesOperation OperationName = "ListTemplates" )
type OptNilDateTime ¶
OptNilDateTime is optional nullable time.Time.
func NewOptNilDateTime ¶
func NewOptNilDateTime(v time.Time) OptNilDateTime
NewOptNilDateTime returns new OptNilDateTime with value set to v.
func (OptNilDateTime) Get ¶
func (o OptNilDateTime) Get() (v time.Time, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilDateTime) IsEmpty ¶
func (o OptNilDateTime) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilDateTime) IsNull ¶
func (o OptNilDateTime) IsNull() bool
IsNull returns true if value is Null.
func (OptNilDateTime) IsSet ¶
func (o OptNilDateTime) IsSet() bool
IsSet returns true if OptNilDateTime was set.
func (OptNilDateTime) MarshalJSON ¶
func (s OptNilDateTime) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilDateTime) Or ¶
func (o OptNilDateTime) Or(d time.Time) time.Time
Or returns value if set, or given parameter if does not.
func (*OptNilDateTime) SetToNull ¶
func (o *OptNilDateTime) SetToNull()
SetToNull sets value to null.
func (*OptNilDateTime) UnmarshalJSON ¶
func (s *OptNilDateTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilFolder ¶
OptNilFolder is optional nullable Folder.
func NewOptNilFolder ¶
func NewOptNilFolder(v Folder) OptNilFolder
NewOptNilFolder returns new OptNilFolder with value set to v.
func (*OptNilFolder) Decode ¶
func (o *OptNilFolder) Decode(d *jx.Decoder) error
Decode decodes Folder from json.
func (OptNilFolder) Encode ¶
func (o OptNilFolder) Encode(e *jx.Encoder)
Encode encodes Folder as json.
func (OptNilFolder) Get ¶
func (o OptNilFolder) Get() (v Folder, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilFolder) IsEmpty ¶
func (o OptNilFolder) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilFolder) IsNull ¶
func (o OptNilFolder) IsNull() bool
IsNull returns true if value is Null.
func (OptNilFolder) IsSet ¶
func (o OptNilFolder) IsSet() bool
IsSet returns true if OptNilFolder was set.
func (OptNilFolder) MarshalJSON ¶
func (s OptNilFolder) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilFolder) Or ¶
func (o OptNilFolder) Or(d Folder) Folder
Or returns value if set, or given parameter if does not.
func (*OptNilFolder) UnmarshalJSON ¶
func (s *OptNilFolder) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilInt ¶
OptNilInt is optional nullable int.
func NewOptNilInt ¶
NewOptNilInt returns new OptNilInt with value set to v.
func (OptNilInt) IsEmpty ¶
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptNilInt) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilNilStringArray ¶
OptNilNilStringArray is optional nullable []NilString.
func NewOptNilNilStringArray ¶
func NewOptNilNilStringArray(v []NilString) OptNilNilStringArray
NewOptNilNilStringArray returns new OptNilNilStringArray with value set to v.
func (*OptNilNilStringArray) Decode ¶
func (o *OptNilNilStringArray) Decode(d *jx.Decoder) error
Decode decodes []NilString from json.
func (OptNilNilStringArray) Encode ¶
func (o OptNilNilStringArray) Encode(e *jx.Encoder)
Encode encodes []NilString as json.
func (OptNilNilStringArray) Get ¶
func (o OptNilNilStringArray) Get() (v []NilString, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilNilStringArray) IsEmpty ¶
func (o OptNilNilStringArray) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilNilStringArray) IsNull ¶
func (o OptNilNilStringArray) IsNull() bool
IsNull returns true if value is Null.
func (OptNilNilStringArray) IsSet ¶
func (o OptNilNilStringArray) IsSet() bool
IsSet returns true if OptNilNilStringArray was set.
func (OptNilNilStringArray) MarshalJSON ¶
func (s OptNilNilStringArray) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilNilStringArray) Or ¶
func (o OptNilNilStringArray) Or(d []NilString) []NilString
Or returns value if set, or given parameter if does not.
func (*OptNilNilStringArray) SetFake ¶
func (s *OptNilNilStringArray) SetFake()
SetFake set fake values.
func (*OptNilNilStringArray) SetTo ¶
func (o *OptNilNilStringArray) SetTo(v []NilString)
SetTo sets value to v.
func (*OptNilNilStringArray) SetToNull ¶
func (o *OptNilNilStringArray) SetToNull()
SetToNull sets value to null.
func (*OptNilNilStringArray) UnmarshalJSON ¶
func (s *OptNilNilStringArray) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilString ¶
OptNilString is optional nullable string.
func NewOptNilString ¶
func NewOptNilString(v string) OptNilString
NewOptNilString returns new OptNilString with value set to v.
func (*OptNilString) Decode ¶
func (o *OptNilString) Decode(d *jx.Decoder) error
Decode decodes string from json.
func (OptNilString) Encode ¶
func (o OptNilString) Encode(e *jx.Encoder)
Encode encodes string as json.
func (OptNilString) Get ¶
func (o OptNilString) Get() (v string, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilString) IsEmpty ¶
func (o OptNilString) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilString) IsNull ¶
func (o OptNilString) IsNull() bool
IsNull returns true if value is Null.
func (OptNilString) IsSet ¶
func (o OptNilString) IsSet() bool
IsSet returns true if OptNilString was set.
func (OptNilString) MarshalJSON ¶
func (s OptNilString) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilString) Or ¶
func (o OptNilString) Or(d string) string
Or returns value if set, or given parameter if does not.
func (*OptNilString) UnmarshalJSON ¶
func (s *OptNilString) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilTemplateStatus ¶
type OptNilTemplateStatus struct {
Value TemplateStatus
Set bool
Null bool
}
OptNilTemplateStatus is optional nullable TemplateStatus.
func NewOptNilTemplateStatus ¶
func NewOptNilTemplateStatus(v TemplateStatus) OptNilTemplateStatus
NewOptNilTemplateStatus returns new OptNilTemplateStatus with value set to v.
func (*OptNilTemplateStatus) Decode ¶
func (o *OptNilTemplateStatus) Decode(d *jx.Decoder) error
Decode decodes TemplateStatus from json.
func (OptNilTemplateStatus) Encode ¶
func (o OptNilTemplateStatus) Encode(e *jx.Encoder)
Encode encodes TemplateStatus as json.
func (OptNilTemplateStatus) Get ¶
func (o OptNilTemplateStatus) Get() (v TemplateStatus, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilTemplateStatus) IsEmpty ¶
func (o OptNilTemplateStatus) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilTemplateStatus) IsNull ¶
func (o OptNilTemplateStatus) IsNull() bool
IsNull returns true if value is Null.
func (OptNilTemplateStatus) IsSet ¶
func (o OptNilTemplateStatus) IsSet() bool
IsSet returns true if OptNilTemplateStatus was set.
func (OptNilTemplateStatus) MarshalJSON ¶
func (s OptNilTemplateStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilTemplateStatus) Or ¶
func (o OptNilTemplateStatus) Or(d TemplateStatus) TemplateStatus
Or returns value if set, or given parameter if does not.
func (*OptNilTemplateStatus) SetFake ¶
func (s *OptNilTemplateStatus) SetFake()
SetFake set fake values.
func (*OptNilTemplateStatus) SetTo ¶
func (o *OptNilTemplateStatus) SetTo(v TemplateStatus)
SetTo sets value to v.
func (*OptNilTemplateStatus) SetToNull ¶
func (o *OptNilTemplateStatus) SetToNull()
SetToNull sets value to null.
func (*OptNilTemplateStatus) UnmarshalJSON ¶
func (s *OptNilTemplateStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface {
ServerOption
ClientOption
}
Option is config option.
func WithAttributes ¶
WithAttributes specifies default otel attributes.
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 Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationGroup ¶
OperationGroup returns the x-ogen-operation-group value.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type Template ¶
type Template struct {
ID int `json:"id"`
CreatedAt time.Time `json:"created_at"`
ArchivedAt OptNilDateTime `json:"archived_at"`
AuthorID OptNilInt `json:"author_id"`
Source OptNilString `json:"source"`
Single OptString `json:"single"`
Status OptNilTemplateStatus `json:"status"`
Tags OptNilNilStringArray `json:"tags"`
Folder OptNilFolder `json:"folder"`
}
Ref: #/components/schemas/Template
func (*Template) GetArchivedAt ¶
func (s *Template) GetArchivedAt() OptNilDateTime
GetArchivedAt returns the value of ArchivedAt.
func (*Template) GetAuthorID ¶
GetAuthorID returns the value of AuthorID.
func (*Template) GetCreatedAt ¶
GetCreatedAt returns the value of CreatedAt.
func (*Template) GetFolder ¶
func (s *Template) GetFolder() OptNilFolder
GetFolder returns the value of Folder.
func (*Template) GetSource ¶
func (s *Template) GetSource() OptNilString
GetSource returns the value of Source.
func (*Template) GetStatus ¶
func (s *Template) GetStatus() OptNilTemplateStatus
GetStatus returns the value of Status.
func (*Template) GetTags ¶
func (s *Template) GetTags() OptNilNilStringArray
GetTags returns the value of Tags.
func (*Template) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Template) SetArchivedAt ¶
func (s *Template) SetArchivedAt(val OptNilDateTime)
SetArchivedAt sets the value of ArchivedAt.
func (*Template) SetAuthorID ¶
SetAuthorID sets the value of AuthorID.
func (*Template) SetCreatedAt ¶
SetCreatedAt sets the value of CreatedAt.
func (*Template) SetFolder ¶
func (s *Template) SetFolder(val OptNilFolder)
SetFolder sets the value of Folder.
func (*Template) SetSource ¶
func (s *Template) SetSource(val OptNilString)
SetSource sets the value of Source.
func (*Template) SetStatus ¶
func (s *Template) SetStatus(val OptNilTemplateStatus)
SetStatus sets the value of Status.
func (*Template) SetTags ¶
func (s *Template) SetTags(val OptNilNilStringArray)
SetTags sets the value of Tags.
func (*Template) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type TemplateStatus ¶
type TemplateStatus string
const ( TemplateStatusDraft TemplateStatus = "draft" TemplateStatusPublished TemplateStatus = "published" )
func (TemplateStatus) AllValues ¶
func (TemplateStatus) AllValues() []TemplateStatus
AllValues returns all TemplateStatus values.
func (*TemplateStatus) Decode ¶
func (s *TemplateStatus) Decode(d *jx.Decoder) error
Decode decodes TemplateStatus from json.
func (TemplateStatus) Encode ¶
func (s TemplateStatus) Encode(e *jx.Encoder)
Encode encodes TemplateStatus as json.
func (TemplateStatus) MarshalJSON ¶
func (s TemplateStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (TemplateStatus) MarshalText ¶
func (s TemplateStatus) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*TemplateStatus) UnmarshalJSON ¶
func (s *TemplateStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*TemplateStatus) UnmarshalText ¶
func (s *TemplateStatus) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (TemplateStatus) Validate ¶
func (s TemplateStatus) Validate() error
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) CreateTemplate ¶
func (UnimplementedHandler) CreateTemplate(ctx context.Context, req *Template) (r *Template, _ error)
CreateTemplate implements createTemplate operation.
POST /templates
func (UnimplementedHandler) ListTemplates ¶
func (UnimplementedHandler) ListTemplates(ctx context.Context) (r []Template, _ error)
ListTemplates implements listTemplates operation.
GET /templates
Source Files
¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_faker_gen.go
- oas_handlers_gen.go
- oas_json_gen.go
- oas_labeler_gen.go
- oas_middleware_gen.go
- oas_operations_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go