fanbox

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: GPL-3.0 Imports: 19 Imported by: 2

README

FANBOX GO

type customSecuritySource struct{}

func (s customSecuritySource) CsrfToken(ctx context.Context, operationName string) (CsrfToken, error) {
	return CsrfToken{
		APIKey: "CsrfToken",
	}, nil
}

func (s customSecuritySource) SessionId(ctx context.Context, operationName string) (SessionId, error) {
	return SessionId{
		APIKey: "SessionId",
	}, nil
}

func main() {
	s := &customSecuritySource{}
	c, err := NewClient("https://api.fanbox.cc", s)
	if err != nil {
		os.Exit(1)
	}

	res, err := c.ListManagedPosts(context.TODO(), ListManagedPostsParams{Origin: "https://www.fanbox.cc"})
	if err != nil {
		fmt.Printf(err.Error())
		os.Exit(1)
	}
	fmt.Printf("res: %+v", res)
}

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 Client

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

Client implements OAS client.

func NewClient

func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) CreatePost

func (c *Client) CreatePost(ctx context.Context, request OptCreatePostReq, params CreatePostParams) (CreatePostRes, error)

CreatePost invokes createPost operation.

Create post.

POST /post.create

func (*Client) DeletePost

func (c *Client) DeletePost(ctx context.Context, request OptDeletePostReq, params DeletePostParams) (DeletePostRes, error)

DeletePost invokes deletePost operation.

Delete post.

POST /post.delete

func (*Client) GetEditablePost

func (c *Client) GetEditablePost(ctx context.Context, params GetEditablePostParams) (GetEditablePostRes, error)

GetEditablePost invokes getEditablePost operation.

Get post.

GET /post.getEditable

func (*Client) ListManagedPosts

func (c *Client) ListManagedPosts(ctx context.Context, params ListManagedPostsParams) (ListManagedPostsRes, error)

ListManagedPosts invokes listManagedPosts operation.

Get posts belongs with you.

GET /post.listManaged

func (*Client) UpdatePost

func (c *Client) UpdatePost(ctx context.Context, request OptUpdatePostReq, params UpdatePostParams) (UpdatePostRes, error)

UpdatePost invokes updatePost operation.

Update post.

POST /post.update

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 Create

type Create struct {
	Body OptCreateBody `json:"body"`
}

func (*Create) Decode

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

Decode decodes Create from json.

func (*Create) Encode

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

Encode implements json.Marshaler.

func (*Create) GetBody

func (s *Create) GetBody() OptCreateBody

GetBody returns the value of Body.

func (*Create) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Create) SetBody

func (s *Create) SetBody(val OptCreateBody)

SetBody sets the value of Body.

func (*Create) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateBody

type CreateBody struct {
	PostId OptString `json:"postId"`
}

func (*CreateBody) Decode

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

Decode decodes CreateBody from json.

func (*CreateBody) Encode

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

Encode implements json.Marshaler.

func (*CreateBody) GetPostId

func (s *CreateBody) GetPostId() OptString

GetPostId returns the value of PostId.

func (*CreateBody) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*CreateBody) SetPostId

func (s *CreateBody) SetPostId(val OptString)

SetPostId sets the value of PostId.

func (*CreateBody) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type CreatePostBadRequestApplicationJSON

type CreatePostBadRequestApplicationJSON jx.Raw

func (*CreatePostBadRequestApplicationJSON) Decode

Decode decodes CreatePostBadRequestApplicationJSON from json.

func (CreatePostBadRequestApplicationJSON) Encode

Encode encodes CreatePostBadRequestApplicationJSON as json.

func (CreatePostBadRequestApplicationJSON) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*CreatePostBadRequestApplicationJSON) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type CreatePostParams

type CreatePostParams struct {
	Origin string
	// You must set user agent.
	UserAgent string
}

CreatePostParams is parameters of createPost operation.

type CreatePostReq

type CreatePostReq struct {
	Type CreatePostReqType `json:"type"`
}

func (*CreatePostReq) Decode

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

Decode decodes CreatePostReq from json.

func (*CreatePostReq) Encode

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

Encode implements json.Marshaler.

func (*CreatePostReq) GetType

func (s *CreatePostReq) GetType() CreatePostReqType

GetType returns the value of Type.

func (*CreatePostReq) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*CreatePostReq) SetType

func (s *CreatePostReq) SetType(val CreatePostReqType)

SetType sets the value of Type.

func (*CreatePostReq) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreatePostReq) Validate

func (s *CreatePostReq) Validate() error

type CreatePostReqType

type CreatePostReqType string
const (
	CreatePostReqTypeArticle CreatePostReqType = "article"
)

func (CreatePostReqType) AllValues

func (CreatePostReqType) AllValues() []CreatePostReqType

AllValues returns all CreatePostReqType values.

func (*CreatePostReqType) Decode

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

Decode decodes CreatePostReqType from json.

func (CreatePostReqType) Encode

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

Encode encodes CreatePostReqType as json.

func (CreatePostReqType) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (CreatePostReqType) MarshalText

func (s CreatePostReqType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*CreatePostReqType) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreatePostReqType) UnmarshalText

func (s *CreatePostReqType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (CreatePostReqType) Validate

func (s CreatePostReqType) Validate() error

type CreatePostRes

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

type CsrfToken

type CsrfToken struct {
	APIKey string
}

func (*CsrfToken) GetAPIKey

func (s *CsrfToken) GetAPIKey() string

GetAPIKey returns the value of APIKey.

func (*CsrfToken) SetAPIKey

func (s *CsrfToken) SetAPIKey(val string)

SetAPIKey sets the value of APIKey.

type Delete

type Delete struct {
	Body OptNull `json:"body"`
}

func (*Delete) Decode

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

Decode decodes Delete from json.

func (*Delete) Encode

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

Encode implements json.Marshaler.

func (*Delete) GetBody

func (s *Delete) GetBody() OptNull

GetBody returns the value of Body.

func (*Delete) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Delete) SetBody

func (s *Delete) SetBody(val OptNull)

SetBody sets the value of Body.

func (*Delete) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type DeletePostParams

type DeletePostParams struct {
	Origin string
	// You must set user agent.
	UserAgent string
}

DeletePostParams is parameters of deletePost operation.

type DeletePostReq

type DeletePostReq struct {
	PostId string `json:"postId"`
}

func (*DeletePostReq) Decode

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

Decode decodes DeletePostReq from json.

func (*DeletePostReq) Encode

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

Encode implements json.Marshaler.

func (*DeletePostReq) GetPostId

func (s *DeletePostReq) GetPostId() string

GetPostId returns the value of PostId.

func (*DeletePostReq) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*DeletePostReq) SetPostId

func (s *DeletePostReq) SetPostId(val string)

SetPostId sets the value of PostId.

func (*DeletePostReq) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type DeletePostRes

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

type Get

type Get struct {
	Body OptPost `json:"body"`
}

func (*Get) Decode

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

Decode decodes Get from json.

func (*Get) Encode

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

Encode implements json.Marshaler.

func (*Get) GetBody

func (s *Get) GetBody() OptPost

GetBody returns the value of Body.

func (*Get) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Get) SetBody

func (s *Get) SetBody(val OptPost)

SetBody sets the value of Body.

func (*Get) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Get) Validate

func (s *Get) Validate() error

type GetEditablePostParams

type GetEditablePostParams struct {
	Origin string
	// You must set user agent.
	UserAgent string
	// Post's id.
	PostId string
}

GetEditablePostParams is parameters of getEditablePost operation.

type GetEditablePostRes

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

type Invoker

type Invoker interface {
	// CreatePost invokes createPost operation.
	//
	// Create post.
	//
	// POST /post.create
	CreatePost(ctx context.Context, request OptCreatePostReq, params CreatePostParams) (CreatePostRes, error)
	// DeletePost invokes deletePost operation.
	//
	// Delete post.
	//
	// POST /post.delete
	DeletePost(ctx context.Context, request OptDeletePostReq, params DeletePostParams) (DeletePostRes, error)
	// GetEditablePost invokes getEditablePost operation.
	//
	// Get post.
	//
	// GET /post.getEditable
	GetEditablePost(ctx context.Context, params GetEditablePostParams) (GetEditablePostRes, error)
	// ListManagedPosts invokes listManagedPosts operation.
	//
	// Get posts belongs with you.
	//
	// GET /post.listManaged
	ListManagedPosts(ctx context.Context, params ListManagedPostsParams) (ListManagedPostsRes, error)
	// UpdatePost invokes updatePost operation.
	//
	// Update post.
	//
	// POST /post.update
	UpdatePost(ctx context.Context, request OptUpdatePostReq, params UpdatePostParams) (UpdatePostRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type List

type List struct {
	Body []Post `json:"body"`
}

func (*List) Decode

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

Decode decodes List from json.

func (*List) Encode

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

Encode implements json.Marshaler.

func (*List) GetBody

func (s *List) GetBody() []Post

GetBody returns the value of Body.

func (*List) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*List) SetBody

func (s *List) SetBody(val []Post)

SetBody sets the value of Body.

func (*List) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*List) Validate

func (s *List) Validate() error

type ListManagedPostsParams

type ListManagedPostsParams struct {
	Origin string
	// You must set user agent.
	UserAgent string
}

ListManagedPostsParams is parameters of listManagedPosts operation.

type ListManagedPostsRes

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

type OptCreateBody

type OptCreateBody struct {
	Value CreateBody
	Set   bool
}

OptCreateBody is optional CreateBody.

func NewOptCreateBody

func NewOptCreateBody(v CreateBody) OptCreateBody

NewOptCreateBody returns new OptCreateBody with value set to v.

func (*OptCreateBody) Decode

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

Decode decodes CreateBody from json.

func (OptCreateBody) Encode

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

Encode encodes CreateBody as json.

func (OptCreateBody) Get

func (o OptCreateBody) Get() (v CreateBody, ok bool)

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

func (OptCreateBody) IsSet

func (o OptCreateBody) IsSet() bool

IsSet returns true if OptCreateBody was set.

func (OptCreateBody) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptCreateBody) Or

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

func (*OptCreateBody) Reset

func (o *OptCreateBody) Reset()

Reset unsets value.

func (*OptCreateBody) SetTo

func (o *OptCreateBody) SetTo(v CreateBody)

SetTo sets value to v.

func (*OptCreateBody) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptCreatePostReq

type OptCreatePostReq struct {
	Value CreatePostReq
	Set   bool
}

OptCreatePostReq is optional CreatePostReq.

func NewOptCreatePostReq

func NewOptCreatePostReq(v CreatePostReq) OptCreatePostReq

NewOptCreatePostReq returns new OptCreatePostReq with value set to v.

func (*OptCreatePostReq) Decode

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

Decode decodes CreatePostReq from json.

func (OptCreatePostReq) Encode

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

Encode encodes CreatePostReq as json.

func (OptCreatePostReq) Get

func (o OptCreatePostReq) Get() (v CreatePostReq, ok bool)

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

func (OptCreatePostReq) IsSet

func (o OptCreatePostReq) IsSet() bool

IsSet returns true if OptCreatePostReq was set.

func (OptCreatePostReq) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptCreatePostReq) Or

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

func (*OptCreatePostReq) Reset

func (o *OptCreatePostReq) Reset()

Reset unsets value.

func (*OptCreatePostReq) SetTo

func (o *OptCreatePostReq) SetTo(v CreatePostReq)

SetTo sets value to v.

func (*OptCreatePostReq) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptDeletePostReq

type OptDeletePostReq struct {
	Value DeletePostReq
	Set   bool
}

OptDeletePostReq is optional DeletePostReq.

func NewOptDeletePostReq

func NewOptDeletePostReq(v DeletePostReq) OptDeletePostReq

NewOptDeletePostReq returns new OptDeletePostReq with value set to v.

func (*OptDeletePostReq) Decode

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

Decode decodes DeletePostReq from json.

func (OptDeletePostReq) Encode

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

Encode encodes DeletePostReq as json.

func (OptDeletePostReq) Get

func (o OptDeletePostReq) Get() (v DeletePostReq, ok bool)

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

func (OptDeletePostReq) IsSet

func (o OptDeletePostReq) IsSet() bool

IsSet returns true if OptDeletePostReq was set.

func (OptDeletePostReq) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptDeletePostReq) Or

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

func (*OptDeletePostReq) Reset

func (o *OptDeletePostReq) Reset()

Reset unsets value.

func (*OptDeletePostReq) SetTo

func (o *OptDeletePostReq) SetTo(v DeletePostReq)

SetTo sets value to v.

func (*OptDeletePostReq) UnmarshalJSON

func (s *OptDeletePostReq) 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) Decode

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

Decode decodes int from json.

func (OptInt) Encode

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

Encode encodes int as json.

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

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

MarshalJSON implements stdjson.Marshaler.

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.

func (*OptInt) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptNull

type OptNull struct {
	Value struct{}
	Set   bool
}

OptNull is optional struct{}.

func NewOptNull

func NewOptNull(v struct{}) OptNull

NewOptNull returns new OptNull with value set to v.

func (*OptNull) Decode

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

Decode decodes struct{} from json.

func (OptNull) Encode

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

Encode encodes struct{} as json.

func (OptNull) Get

func (o OptNull) Get() (v struct{}, ok bool)

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

func (OptNull) IsSet

func (o OptNull) IsSet() bool

IsSet returns true if OptNull was set.

func (OptNull) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptNull) Or

func (o OptNull) Or(d struct{}) struct{}

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

func (*OptNull) Reset

func (o *OptNull) Reset()

Reset unsets value.

func (*OptNull) SetTo

func (o *OptNull) SetTo(v struct{})

SetTo sets value to v.

func (*OptNull) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPost

type OptPost struct {
	Value Post
	Set   bool
}

OptPost is optional Post.

func NewOptPost

func NewOptPost(v Post) OptPost

NewOptPost returns new OptPost with value set to v.

func (*OptPost) Decode

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

Decode decodes Post from json.

func (OptPost) Encode

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

Encode encodes Post as json.

func (OptPost) Get

func (o OptPost) Get() (v Post, ok bool)

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

func (OptPost) IsSet

func (o OptPost) IsSet() bool

IsSet returns true if OptPost was set.

func (OptPost) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptPost) Or

func (o OptPost) Or(d Post) Post

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

func (*OptPost) Reset

func (o *OptPost) Reset()

Reset unsets value.

func (*OptPost) SetTo

func (o *OptPost) SetTo(v Post)

SetTo sets value to v.

func (*OptPost) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPostBody

type OptPostBody struct {
	Value PostBody
	Set   bool
}

OptPostBody is optional PostBody.

func NewOptPostBody

func NewOptPostBody(v PostBody) OptPostBody

NewOptPostBody returns new OptPostBody with value set to v.

func (*OptPostBody) Decode

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

Decode decodes PostBody from json.

func (OptPostBody) Encode

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

Encode encodes PostBody as json.

func (OptPostBody) Get

func (o OptPostBody) Get() (v PostBody, ok bool)

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

func (OptPostBody) IsSet

func (o OptPostBody) IsSet() bool

IsSet returns true if OptPostBody was set.

func (OptPostBody) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptPostBody) Or

func (o OptPostBody) Or(d PostBody) PostBody

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

func (*OptPostBody) Reset

func (o *OptPostBody) Reset()

Reset unsets value.

func (*OptPostBody) SetTo

func (o *OptPostBody) SetTo(v PostBody)

SetTo sets value to v.

func (*OptPostBody) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPostBodyBlocksItemStylesItemType

type OptPostBodyBlocksItemStylesItemType struct {
	Value PostBodyBlocksItemStylesItemType
	Set   bool
}

OptPostBodyBlocksItemStylesItemType is optional PostBodyBlocksItemStylesItemType.

func NewOptPostBodyBlocksItemStylesItemType

func NewOptPostBodyBlocksItemStylesItemType(v PostBodyBlocksItemStylesItemType) OptPostBodyBlocksItemStylesItemType

NewOptPostBodyBlocksItemStylesItemType returns new OptPostBodyBlocksItemStylesItemType with value set to v.

func (*OptPostBodyBlocksItemStylesItemType) Decode

Decode decodes PostBodyBlocksItemStylesItemType from json.

func (OptPostBodyBlocksItemStylesItemType) Encode

Encode encodes PostBodyBlocksItemStylesItemType as json.

func (OptPostBodyBlocksItemStylesItemType) Get

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

func (OptPostBodyBlocksItemStylesItemType) IsSet

IsSet returns true if OptPostBodyBlocksItemStylesItemType was set.

func (OptPostBodyBlocksItemStylesItemType) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptPostBodyBlocksItemStylesItemType) Or

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

func (*OptPostBodyBlocksItemStylesItemType) Reset

Reset unsets value.

func (*OptPostBodyBlocksItemStylesItemType) SetTo

SetTo sets value to v.

func (*OptPostBodyBlocksItemStylesItemType) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPostBodyBlocksItemType

type OptPostBodyBlocksItemType struct {
	Value PostBodyBlocksItemType
	Set   bool
}

OptPostBodyBlocksItemType is optional PostBodyBlocksItemType.

func NewOptPostBodyBlocksItemType

func NewOptPostBodyBlocksItemType(v PostBodyBlocksItemType) OptPostBodyBlocksItemType

NewOptPostBodyBlocksItemType returns new OptPostBodyBlocksItemType with value set to v.

func (*OptPostBodyBlocksItemType) Decode

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

Decode decodes PostBodyBlocksItemType from json.

func (OptPostBodyBlocksItemType) Encode

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

Encode encodes PostBodyBlocksItemType as json.

func (OptPostBodyBlocksItemType) Get

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

func (OptPostBodyBlocksItemType) IsSet

func (o OptPostBodyBlocksItemType) IsSet() bool

IsSet returns true if OptPostBodyBlocksItemType was set.

func (OptPostBodyBlocksItemType) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptPostBodyBlocksItemType) Or

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

func (*OptPostBodyBlocksItemType) Reset

func (o *OptPostBodyBlocksItemType) Reset()

Reset unsets value.

func (*OptPostBodyBlocksItemType) SetTo

SetTo sets value to v.

func (*OptPostBodyBlocksItemType) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPostBodyImageMap

type OptPostBodyImageMap struct {
	Value PostBodyImageMap
	Set   bool
}

OptPostBodyImageMap is optional PostBodyImageMap.

func NewOptPostBodyImageMap

func NewOptPostBodyImageMap(v PostBodyImageMap) OptPostBodyImageMap

NewOptPostBodyImageMap returns new OptPostBodyImageMap with value set to v.

func (*OptPostBodyImageMap) Decode

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

Decode decodes PostBodyImageMap from json.

func (OptPostBodyImageMap) Encode

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

Encode encodes PostBodyImageMap as json.

func (OptPostBodyImageMap) Get

func (o OptPostBodyImageMap) Get() (v PostBodyImageMap, ok bool)

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

func (OptPostBodyImageMap) IsSet

func (o OptPostBodyImageMap) IsSet() bool

IsSet returns true if OptPostBodyImageMap was set.

func (OptPostBodyImageMap) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptPostBodyImageMap) Or

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

func (*OptPostBodyImageMap) Reset

func (o *OptPostBodyImageMap) Reset()

Reset unsets value.

func (*OptPostBodyImageMap) SetTo

SetTo sets value to v.

func (*OptPostBodyImageMap) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPostBodyUrlEmbedMap

type OptPostBodyUrlEmbedMap struct {
	Value PostBodyUrlEmbedMap
	Set   bool
}

OptPostBodyUrlEmbedMap is optional PostBodyUrlEmbedMap.

func NewOptPostBodyUrlEmbedMap

func NewOptPostBodyUrlEmbedMap(v PostBodyUrlEmbedMap) OptPostBodyUrlEmbedMap

NewOptPostBodyUrlEmbedMap returns new OptPostBodyUrlEmbedMap with value set to v.

func (*OptPostBodyUrlEmbedMap) Decode

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

Decode decodes PostBodyUrlEmbedMap from json.

func (OptPostBodyUrlEmbedMap) Encode

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

Encode encodes PostBodyUrlEmbedMap as json.

func (OptPostBodyUrlEmbedMap) Get

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

func (OptPostBodyUrlEmbedMap) IsSet

func (o OptPostBodyUrlEmbedMap) IsSet() bool

IsSet returns true if OptPostBodyUrlEmbedMap was set.

func (OptPostBodyUrlEmbedMap) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptPostBodyUrlEmbedMap) Or

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

func (*OptPostBodyUrlEmbedMap) Reset

func (o *OptPostBodyUrlEmbedMap) Reset()

Reset unsets value.

func (*OptPostBodyUrlEmbedMap) SetTo

SetTo sets value to v.

func (*OptPostBodyUrlEmbedMap) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPostBodyUrlEmbedMapItemPostInfo

type OptPostBodyUrlEmbedMapItemPostInfo struct {
	Value PostBodyUrlEmbedMapItemPostInfo
	Set   bool
}

OptPostBodyUrlEmbedMapItemPostInfo is optional PostBodyUrlEmbedMapItemPostInfo.

func NewOptPostBodyUrlEmbedMapItemPostInfo

func NewOptPostBodyUrlEmbedMapItemPostInfo(v PostBodyUrlEmbedMapItemPostInfo) OptPostBodyUrlEmbedMapItemPostInfo

NewOptPostBodyUrlEmbedMapItemPostInfo returns new OptPostBodyUrlEmbedMapItemPostInfo with value set to v.

func (*OptPostBodyUrlEmbedMapItemPostInfo) Decode

Decode decodes PostBodyUrlEmbedMapItemPostInfo from json.

func (OptPostBodyUrlEmbedMapItemPostInfo) Encode

Encode encodes PostBodyUrlEmbedMapItemPostInfo as json.

func (OptPostBodyUrlEmbedMapItemPostInfo) Get

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

func (OptPostBodyUrlEmbedMapItemPostInfo) IsSet

IsSet returns true if OptPostBodyUrlEmbedMapItemPostInfo was set.

func (OptPostBodyUrlEmbedMapItemPostInfo) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptPostBodyUrlEmbedMapItemPostInfo) Or

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

func (*OptPostBodyUrlEmbedMapItemPostInfo) Reset

Reset unsets value.

func (*OptPostBodyUrlEmbedMapItemPostInfo) SetTo

SetTo sets value to v.

func (*OptPostBodyUrlEmbedMapItemPostInfo) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPostBodyUrlEmbedMapItemType

type OptPostBodyUrlEmbedMapItemType struct {
	Value PostBodyUrlEmbedMapItemType
	Set   bool
}

OptPostBodyUrlEmbedMapItemType is optional PostBodyUrlEmbedMapItemType.

func NewOptPostBodyUrlEmbedMapItemType

func NewOptPostBodyUrlEmbedMapItemType(v PostBodyUrlEmbedMapItemType) OptPostBodyUrlEmbedMapItemType

NewOptPostBodyUrlEmbedMapItemType returns new OptPostBodyUrlEmbedMapItemType with value set to v.

func (*OptPostBodyUrlEmbedMapItemType) Decode

Decode decodes PostBodyUrlEmbedMapItemType from json.

func (OptPostBodyUrlEmbedMapItemType) Encode

Encode encodes PostBodyUrlEmbedMapItemType as json.

func (OptPostBodyUrlEmbedMapItemType) Get

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

func (OptPostBodyUrlEmbedMapItemType) IsSet

IsSet returns true if OptPostBodyUrlEmbedMapItemType was set.

func (OptPostBodyUrlEmbedMapItemType) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptPostBodyUrlEmbedMapItemType) Or

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

func (*OptPostBodyUrlEmbedMapItemType) Reset

func (o *OptPostBodyUrlEmbedMapItemType) Reset()

Reset unsets value.

func (*OptPostBodyUrlEmbedMapItemType) SetTo

SetTo sets value to v.

func (*OptPostBodyUrlEmbedMapItemType) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPostStatus

type OptPostStatus struct {
	Value PostStatus
	Set   bool
}

OptPostStatus is optional PostStatus.

func NewOptPostStatus

func NewOptPostStatus(v PostStatus) OptPostStatus

NewOptPostStatus returns new OptPostStatus with value set to v.

func (*OptPostStatus) Decode

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

Decode decodes PostStatus from json.

func (OptPostStatus) Encode

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

Encode encodes PostStatus as json.

func (OptPostStatus) Get

func (o OptPostStatus) Get() (v PostStatus, ok bool)

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

func (OptPostStatus) IsSet

func (o OptPostStatus) IsSet() bool

IsSet returns true if OptPostStatus was set.

func (OptPostStatus) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptPostStatus) Or

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

func (*OptPostStatus) Reset

func (o *OptPostStatus) Reset()

Reset unsets value.

func (*OptPostStatus) SetTo

func (o *OptPostStatus) SetTo(v PostStatus)

SetTo sets value to v.

func (*OptPostStatus) UnmarshalJSON

func (s *OptPostStatus) 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 OptUpdatePostReq

type OptUpdatePostReq struct {
	Value UpdatePostReq
	Set   bool
}

OptUpdatePostReq is optional UpdatePostReq.

func NewOptUpdatePostReq

func NewOptUpdatePostReq(v UpdatePostReq) OptUpdatePostReq

NewOptUpdatePostReq returns new OptUpdatePostReq with value set to v.

func (OptUpdatePostReq) Get

func (o OptUpdatePostReq) Get() (v UpdatePostReq, ok bool)

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

func (OptUpdatePostReq) IsSet

func (o OptUpdatePostReq) IsSet() bool

IsSet returns true if OptUpdatePostReq was set.

func (OptUpdatePostReq) Or

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

func (*OptUpdatePostReq) Reset

func (o *OptUpdatePostReq) Reset()

Reset unsets value.

func (*OptUpdatePostReq) SetTo

func (o *OptUpdatePostReq) SetTo(v UpdatePostReq)

SetTo sets value to v.

type OptUpdatePostReqStatus

type OptUpdatePostReqStatus struct {
	Value UpdatePostReqStatus
	Set   bool
}

OptUpdatePostReqStatus is optional UpdatePostReqStatus.

func NewOptUpdatePostReqStatus

func NewOptUpdatePostReqStatus(v UpdatePostReqStatus) OptUpdatePostReqStatus

NewOptUpdatePostReqStatus returns new OptUpdatePostReqStatus with value set to v.

func (OptUpdatePostReqStatus) Get

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

func (OptUpdatePostReqStatus) IsSet

func (o OptUpdatePostReqStatus) IsSet() bool

IsSet returns true if OptUpdatePostReqStatus was set.

func (OptUpdatePostReqStatus) Or

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

func (*OptUpdatePostReqStatus) Reset

func (o *OptUpdatePostReqStatus) Reset()

Reset unsets value.

func (*OptUpdatePostReqStatus) SetTo

SetTo sets value to v.

type Option

type Option interface {
	ClientOption
}

Option is config option.

type Post

type Post struct {
	ID          OptString     `json:"id"`
	Title       OptString     `json:"title"`
	Status      OptPostStatus `json:"status"`
	Permalink   OptString     `json:"permalink"`
	FeeRequired OptInt        `json:"feeRequired"`
	UpdatedAt   OptString     `json:"updatedAt"`
	PublishedAt OptString     `json:"publishedAt"`
	Body        OptPostBody   `json:"body"`
}

Ref: #/components/schemas/Post

func (*Post) Decode

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

Decode decodes Post from json.

func (*Post) Encode

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

Encode implements json.Marshaler.

func (*Post) GetBody

func (s *Post) GetBody() OptPostBody

GetBody returns the value of Body.

func (*Post) GetFeeRequired

func (s *Post) GetFeeRequired() OptInt

GetFeeRequired returns the value of FeeRequired.

func (*Post) GetID

func (s *Post) GetID() OptString

GetID returns the value of ID.

func (s *Post) GetPermalink() OptString

GetPermalink returns the value of Permalink.

func (*Post) GetPublishedAt

func (s *Post) GetPublishedAt() OptString

GetPublishedAt returns the value of PublishedAt.

func (*Post) GetStatus

func (s *Post) GetStatus() OptPostStatus

GetStatus returns the value of Status.

func (*Post) GetTitle

func (s *Post) GetTitle() OptString

GetTitle returns the value of Title.

func (*Post) GetUpdatedAt

func (s *Post) GetUpdatedAt() OptString

GetUpdatedAt returns the value of UpdatedAt.

func (*Post) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Post) SetBody

func (s *Post) SetBody(val OptPostBody)

SetBody sets the value of Body.

func (*Post) SetFeeRequired

func (s *Post) SetFeeRequired(val OptInt)

SetFeeRequired sets the value of FeeRequired.

func (*Post) SetID

func (s *Post) SetID(val OptString)

SetID sets the value of ID.

func (s *Post) SetPermalink(val OptString)

SetPermalink sets the value of Permalink.

func (*Post) SetPublishedAt

func (s *Post) SetPublishedAt(val OptString)

SetPublishedAt sets the value of PublishedAt.

func (*Post) SetStatus

func (s *Post) SetStatus(val OptPostStatus)

SetStatus sets the value of Status.

func (*Post) SetTitle

func (s *Post) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*Post) SetUpdatedAt

func (s *Post) SetUpdatedAt(val OptString)

SetUpdatedAt sets the value of UpdatedAt.

func (*Post) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Post) Validate

func (s *Post) Validate() error

type PostBody

type PostBody struct {
	Blocks      []PostBodyBlocksItem   `json:"blocks"`
	ImageMap    OptPostBodyImageMap    `json:"imageMap"`
	UrlEmbedMap OptPostBodyUrlEmbedMap `json:"urlEmbedMap"`
}

func (*PostBody) Decode

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

Decode decodes PostBody from json.

func (*PostBody) Encode

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

Encode implements json.Marshaler.

func (*PostBody) GetBlocks

func (s *PostBody) GetBlocks() []PostBodyBlocksItem

GetBlocks returns the value of Blocks.

func (*PostBody) GetImageMap

func (s *PostBody) GetImageMap() OptPostBodyImageMap

GetImageMap returns the value of ImageMap.

func (*PostBody) GetUrlEmbedMap

func (s *PostBody) GetUrlEmbedMap() OptPostBodyUrlEmbedMap

GetUrlEmbedMap returns the value of UrlEmbedMap.

func (*PostBody) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*PostBody) SetBlocks

func (s *PostBody) SetBlocks(val []PostBodyBlocksItem)

SetBlocks sets the value of Blocks.

func (*PostBody) SetImageMap

func (s *PostBody) SetImageMap(val OptPostBodyImageMap)

SetImageMap sets the value of ImageMap.

func (*PostBody) SetUrlEmbedMap

func (s *PostBody) SetUrlEmbedMap(val OptPostBodyUrlEmbedMap)

SetUrlEmbedMap sets the value of UrlEmbedMap.

func (*PostBody) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PostBody) Validate

func (s *PostBody) Validate() error

type PostBodyBlocksItem

type PostBodyBlocksItem struct {
	Type       OptPostBodyBlocksItemType      `json:"type"`
	Text       OptString                      `json:"text"`
	ImageId    OptString                      `json:"imageId"`
	UrlEmbedId OptString                      `json:"urlEmbedId"`
	Styles     []PostBodyBlocksItemStylesItem `json:"styles"`
}

func (*PostBodyBlocksItem) Decode

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

Decode decodes PostBodyBlocksItem from json.

func (*PostBodyBlocksItem) Encode

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

Encode implements json.Marshaler.

func (*PostBodyBlocksItem) GetImageId

func (s *PostBodyBlocksItem) GetImageId() OptString

GetImageId returns the value of ImageId.

func (*PostBodyBlocksItem) GetStyles

GetStyles returns the value of Styles.

func (*PostBodyBlocksItem) GetText

func (s *PostBodyBlocksItem) GetText() OptString

GetText returns the value of Text.

func (*PostBodyBlocksItem) GetType

GetType returns the value of Type.

func (*PostBodyBlocksItem) GetUrlEmbedId

func (s *PostBodyBlocksItem) GetUrlEmbedId() OptString

GetUrlEmbedId returns the value of UrlEmbedId.

func (*PostBodyBlocksItem) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*PostBodyBlocksItem) SetImageId

func (s *PostBodyBlocksItem) SetImageId(val OptString)

SetImageId sets the value of ImageId.

func (*PostBodyBlocksItem) SetStyles

SetStyles sets the value of Styles.

func (*PostBodyBlocksItem) SetText

func (s *PostBodyBlocksItem) SetText(val OptString)

SetText sets the value of Text.

func (*PostBodyBlocksItem) SetType

SetType sets the value of Type.

func (*PostBodyBlocksItem) SetUrlEmbedId

func (s *PostBodyBlocksItem) SetUrlEmbedId(val OptString)

SetUrlEmbedId sets the value of UrlEmbedId.

func (*PostBodyBlocksItem) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PostBodyBlocksItem) Validate

func (s *PostBodyBlocksItem) Validate() error

type PostBodyBlocksItemStylesItem

type PostBodyBlocksItemStylesItem struct {
	Type   OptPostBodyBlocksItemStylesItemType `json:"type"`
	Offset OptInt                              `json:"offset"`
	Length OptInt                              `json:"length"`
}

func (*PostBodyBlocksItemStylesItem) Decode

Decode decodes PostBodyBlocksItemStylesItem from json.

func (*PostBodyBlocksItemStylesItem) Encode

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

Encode implements json.Marshaler.

func (*PostBodyBlocksItemStylesItem) GetLength

func (s *PostBodyBlocksItemStylesItem) GetLength() OptInt

GetLength returns the value of Length.

func (*PostBodyBlocksItemStylesItem) GetOffset

func (s *PostBodyBlocksItemStylesItem) GetOffset() OptInt

GetOffset returns the value of Offset.

func (*PostBodyBlocksItemStylesItem) GetType

GetType returns the value of Type.

func (*PostBodyBlocksItemStylesItem) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*PostBodyBlocksItemStylesItem) SetLength

func (s *PostBodyBlocksItemStylesItem) SetLength(val OptInt)

SetLength sets the value of Length.

func (*PostBodyBlocksItemStylesItem) SetOffset

func (s *PostBodyBlocksItemStylesItem) SetOffset(val OptInt)

SetOffset sets the value of Offset.

func (*PostBodyBlocksItemStylesItem) SetType

SetType sets the value of Type.

func (*PostBodyBlocksItemStylesItem) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PostBodyBlocksItemStylesItem) Validate

func (s *PostBodyBlocksItemStylesItem) Validate() error

type PostBodyBlocksItemStylesItemType

type PostBodyBlocksItemStylesItemType string
const (
	PostBodyBlocksItemStylesItemTypeBold PostBodyBlocksItemStylesItemType = "bold"
)

func (PostBodyBlocksItemStylesItemType) AllValues

AllValues returns all PostBodyBlocksItemStylesItemType values.

func (*PostBodyBlocksItemStylesItemType) Decode

Decode decodes PostBodyBlocksItemStylesItemType from json.

func (PostBodyBlocksItemStylesItemType) Encode

Encode encodes PostBodyBlocksItemStylesItemType as json.

func (PostBodyBlocksItemStylesItemType) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (PostBodyBlocksItemStylesItemType) MarshalText

func (s PostBodyBlocksItemStylesItemType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*PostBodyBlocksItemStylesItemType) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PostBodyBlocksItemStylesItemType) UnmarshalText

func (s *PostBodyBlocksItemStylesItemType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (PostBodyBlocksItemStylesItemType) Validate

type PostBodyBlocksItemType

type PostBodyBlocksItemType string
const (
	PostBodyBlocksItemTypeP        PostBodyBlocksItemType = "p"
	PostBodyBlocksItemTypeHeader   PostBodyBlocksItemType = "header"
	PostBodyBlocksItemTypeImage    PostBodyBlocksItemType = "image"
	PostBodyBlocksItemTypeURLEmbed PostBodyBlocksItemType = "url_embed"
)

func (PostBodyBlocksItemType) AllValues

AllValues returns all PostBodyBlocksItemType values.

func (*PostBodyBlocksItemType) Decode

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

Decode decodes PostBodyBlocksItemType from json.

func (PostBodyBlocksItemType) Encode

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

Encode encodes PostBodyBlocksItemType as json.

func (PostBodyBlocksItemType) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (PostBodyBlocksItemType) MarshalText

func (s PostBodyBlocksItemType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*PostBodyBlocksItemType) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PostBodyBlocksItemType) UnmarshalText

func (s *PostBodyBlocksItemType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (PostBodyBlocksItemType) Validate

func (s PostBodyBlocksItemType) Validate() error

type PostBodyImageMap

type PostBodyImageMap map[string]PostBodyImageMapItem

func (*PostBodyImageMap) Decode

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

Decode decodes PostBodyImageMap from json.

func (PostBodyImageMap) Encode

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

Encode implements json.Marshaler.

func (PostBodyImageMap) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*PostBodyImageMap) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type PostBodyImageMapItem

type PostBodyImageMapItem struct {
	ID           OptString `json:"id"`
	Extension    OptString `json:"extension"`
	OriginalUrl  OptString `json:"originalUrl"`
	ThumbnailUrl OptString `json:"thumbnailUrl"`
}

func (*PostBodyImageMapItem) Decode

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

Decode decodes PostBodyImageMapItem from json.

func (*PostBodyImageMapItem) Encode

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

Encode implements json.Marshaler.

func (*PostBodyImageMapItem) GetExtension

func (s *PostBodyImageMapItem) GetExtension() OptString

GetExtension returns the value of Extension.

func (*PostBodyImageMapItem) GetID

func (s *PostBodyImageMapItem) GetID() OptString

GetID returns the value of ID.

func (*PostBodyImageMapItem) GetOriginalUrl

func (s *PostBodyImageMapItem) GetOriginalUrl() OptString

GetOriginalUrl returns the value of OriginalUrl.

func (*PostBodyImageMapItem) GetThumbnailUrl

func (s *PostBodyImageMapItem) GetThumbnailUrl() OptString

GetThumbnailUrl returns the value of ThumbnailUrl.

func (*PostBodyImageMapItem) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*PostBodyImageMapItem) SetExtension

func (s *PostBodyImageMapItem) SetExtension(val OptString)

SetExtension sets the value of Extension.

func (*PostBodyImageMapItem) SetID

func (s *PostBodyImageMapItem) SetID(val OptString)

SetID sets the value of ID.

func (*PostBodyImageMapItem) SetOriginalUrl

func (s *PostBodyImageMapItem) SetOriginalUrl(val OptString)

SetOriginalUrl sets the value of OriginalUrl.

func (*PostBodyImageMapItem) SetThumbnailUrl

func (s *PostBodyImageMapItem) SetThumbnailUrl(val OptString)

SetThumbnailUrl sets the value of ThumbnailUrl.

func (*PostBodyImageMapItem) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type PostBodyUrlEmbedMap

type PostBodyUrlEmbedMap map[string]PostBodyUrlEmbedMapItem

func (*PostBodyUrlEmbedMap) Decode

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

Decode decodes PostBodyUrlEmbedMap from json.

func (PostBodyUrlEmbedMap) Encode

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

Encode implements json.Marshaler.

func (PostBodyUrlEmbedMap) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*PostBodyUrlEmbedMap) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (PostBodyUrlEmbedMap) Validate

func (s PostBodyUrlEmbedMap) Validate() error

type PostBodyUrlEmbedMapItem

type PostBodyUrlEmbedMapItem struct {
	ID       OptString                          `json:"id"`
	Type     OptPostBodyUrlEmbedMapItemType     `json:"type"`
	HTML     OptString                          `json:"html"`
	URL      OptString                          `json:"url"`
	PostInfo OptPostBodyUrlEmbedMapItemPostInfo `json:"postInfo"`
}

func (*PostBodyUrlEmbedMapItem) Decode

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

Decode decodes PostBodyUrlEmbedMapItem from json.

func (*PostBodyUrlEmbedMapItem) Encode

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

Encode implements json.Marshaler.

func (*PostBodyUrlEmbedMapItem) GetHTML

func (s *PostBodyUrlEmbedMapItem) GetHTML() OptString

GetHTML returns the value of HTML.

func (*PostBodyUrlEmbedMapItem) GetID

GetID returns the value of ID.

func (*PostBodyUrlEmbedMapItem) GetPostInfo

GetPostInfo returns the value of PostInfo.

func (*PostBodyUrlEmbedMapItem) GetType

GetType returns the value of Type.

func (*PostBodyUrlEmbedMapItem) GetURL

func (s *PostBodyUrlEmbedMapItem) GetURL() OptString

GetURL returns the value of URL.

func (*PostBodyUrlEmbedMapItem) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*PostBodyUrlEmbedMapItem) SetHTML

func (s *PostBodyUrlEmbedMapItem) SetHTML(val OptString)

SetHTML sets the value of HTML.

func (*PostBodyUrlEmbedMapItem) SetID

func (s *PostBodyUrlEmbedMapItem) SetID(val OptString)

SetID sets the value of ID.

func (*PostBodyUrlEmbedMapItem) SetPostInfo

SetPostInfo sets the value of PostInfo.

func (*PostBodyUrlEmbedMapItem) SetType

SetType sets the value of Type.

func (*PostBodyUrlEmbedMapItem) SetURL

func (s *PostBodyUrlEmbedMapItem) SetURL(val OptString)

SetURL sets the value of URL.

func (*PostBodyUrlEmbedMapItem) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PostBodyUrlEmbedMapItem) Validate

func (s *PostBodyUrlEmbedMapItem) Validate() error

type PostBodyUrlEmbedMapItemPostInfo

type PostBodyUrlEmbedMapItemPostInfo struct {
	ID        OptString `json:"id"`
	CreatorId OptString `json:"creatorId"`
}

func (*PostBodyUrlEmbedMapItemPostInfo) Decode

Decode decodes PostBodyUrlEmbedMapItemPostInfo from json.

func (*PostBodyUrlEmbedMapItemPostInfo) Encode

Encode implements json.Marshaler.

func (*PostBodyUrlEmbedMapItemPostInfo) GetCreatorId

func (s *PostBodyUrlEmbedMapItemPostInfo) GetCreatorId() OptString

GetCreatorId returns the value of CreatorId.

func (*PostBodyUrlEmbedMapItemPostInfo) GetID

GetID returns the value of ID.

func (*PostBodyUrlEmbedMapItemPostInfo) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*PostBodyUrlEmbedMapItemPostInfo) SetCreatorId

func (s *PostBodyUrlEmbedMapItemPostInfo) SetCreatorId(val OptString)

SetCreatorId sets the value of CreatorId.

func (*PostBodyUrlEmbedMapItemPostInfo) SetID

SetID sets the value of ID.

func (*PostBodyUrlEmbedMapItemPostInfo) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type PostBodyUrlEmbedMapItemType

type PostBodyUrlEmbedMapItemType string
const (
	PostBodyUrlEmbedMapItemTypeHTMLCard   PostBodyUrlEmbedMapItemType = "html.card"
	PostBodyUrlEmbedMapItemTypeHTML       PostBodyUrlEmbedMapItemType = "html"
	PostBodyUrlEmbedMapItemTypeFanboxPost PostBodyUrlEmbedMapItemType = "fanbox.post"
	PostBodyUrlEmbedMapItemTypeDefault    PostBodyUrlEmbedMapItemType = "default"
)

func (PostBodyUrlEmbedMapItemType) AllValues

AllValues returns all PostBodyUrlEmbedMapItemType values.

func (*PostBodyUrlEmbedMapItemType) Decode

Decode decodes PostBodyUrlEmbedMapItemType from json.

func (PostBodyUrlEmbedMapItemType) Encode

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

Encode encodes PostBodyUrlEmbedMapItemType as json.

func (PostBodyUrlEmbedMapItemType) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (PostBodyUrlEmbedMapItemType) MarshalText

func (s PostBodyUrlEmbedMapItemType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*PostBodyUrlEmbedMapItemType) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PostBodyUrlEmbedMapItemType) UnmarshalText

func (s *PostBodyUrlEmbedMapItemType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (PostBodyUrlEmbedMapItemType) Validate

func (s PostBodyUrlEmbedMapItemType) Validate() error

type PostStatus

type PostStatus string
const (
	PostStatusDraft     PostStatus = "draft"
	PostStatusPublished PostStatus = "published"
)

func (PostStatus) AllValues

func (PostStatus) AllValues() []PostStatus

AllValues returns all PostStatus values.

func (*PostStatus) Decode

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

Decode decodes PostStatus from json.

func (PostStatus) Encode

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

Encode encodes PostStatus as json.

func (PostStatus) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (PostStatus) MarshalText

func (s PostStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*PostStatus) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PostStatus) UnmarshalText

func (s *PostStatus) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (PostStatus) Validate

func (s PostStatus) Validate() error

type SecuritySource

type SecuritySource interface {
	// CsrfToken provides csrfToken security value.
	// You must set CSTF Token in header.
	CsrfToken(ctx context.Context, operationName string) (CsrfToken, error)
	// SessionId provides sessionId security value.
	// You must set Session ID in cookie.
	SessionId(ctx context.Context, operationName string) (SessionId, error)
}

SecuritySource is provider of security values (tokens, passwords, etc.).

type SessionId

type SessionId struct {
	APIKey string
}

func (*SessionId) GetAPIKey

func (s *SessionId) GetAPIKey() string

GetAPIKey returns the value of APIKey.

func (*SessionId) SetAPIKey

func (s *SessionId) SetAPIKey(val string)

SetAPIKey sets the value of APIKey.

type Update

type Update struct {
	Body OptPost `json:"body"`
}

func (*Update) Decode

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

Decode decodes Update from json.

func (*Update) Encode

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

Encode implements json.Marshaler.

func (*Update) GetBody

func (s *Update) GetBody() OptPost

GetBody returns the value of Body.

func (*Update) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Update) SetBody

func (s *Update) SetBody(val OptPost)

SetBody sets the value of Body.

func (*Update) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Update) Validate

func (s *Update) Validate() error

type UpdatePostParams

type UpdatePostParams struct {
	Origin string
	// You must set user agent.
	UserAgent string
}

UpdatePostParams is parameters of updatePost operation.

type UpdatePostReq

type UpdatePostReq struct {
	PostId      OptString              `json:"postId"`
	Status      OptUpdatePostReqStatus `json:"status"`
	FeeRequired OptString              `json:"feeRequired"`
	Title       OptString              `json:"title"`
	Body        OptString              `json:"body"`
	Tags        []string               `json:"tags"`
	Tt          OptString              `json:"tt"`
}

func (*UpdatePostReq) GetBody

func (s *UpdatePostReq) GetBody() OptString

GetBody returns the value of Body.

func (*UpdatePostReq) GetFeeRequired

func (s *UpdatePostReq) GetFeeRequired() OptString

GetFeeRequired returns the value of FeeRequired.

func (*UpdatePostReq) GetPostId

func (s *UpdatePostReq) GetPostId() OptString

GetPostId returns the value of PostId.

func (*UpdatePostReq) GetStatus

func (s *UpdatePostReq) GetStatus() OptUpdatePostReqStatus

GetStatus returns the value of Status.

func (*UpdatePostReq) GetTags

func (s *UpdatePostReq) GetTags() []string

GetTags returns the value of Tags.

func (*UpdatePostReq) GetTitle

func (s *UpdatePostReq) GetTitle() OptString

GetTitle returns the value of Title.

func (*UpdatePostReq) GetTt

func (s *UpdatePostReq) GetTt() OptString

GetTt returns the value of Tt.

func (*UpdatePostReq) SetBody

func (s *UpdatePostReq) SetBody(val OptString)

SetBody sets the value of Body.

func (*UpdatePostReq) SetFeeRequired

func (s *UpdatePostReq) SetFeeRequired(val OptString)

SetFeeRequired sets the value of FeeRequired.

func (*UpdatePostReq) SetPostId

func (s *UpdatePostReq) SetPostId(val OptString)

SetPostId sets the value of PostId.

func (*UpdatePostReq) SetStatus

func (s *UpdatePostReq) SetStatus(val OptUpdatePostReqStatus)

SetStatus sets the value of Status.

func (*UpdatePostReq) SetTags

func (s *UpdatePostReq) SetTags(val []string)

SetTags sets the value of Tags.

func (*UpdatePostReq) SetTitle

func (s *UpdatePostReq) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*UpdatePostReq) SetTt

func (s *UpdatePostReq) SetTt(val OptString)

SetTt sets the value of Tt.

func (*UpdatePostReq) Validate

func (s *UpdatePostReq) Validate() error

type UpdatePostReqStatus

type UpdatePostReqStatus string
const (
	UpdatePostReqStatusDraft     UpdatePostReqStatus = "draft"
	UpdatePostReqStatusPublished UpdatePostReqStatus = "published"
)

func (UpdatePostReqStatus) AllValues

AllValues returns all UpdatePostReqStatus values.

func (UpdatePostReqStatus) MarshalText

func (s UpdatePostReqStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*UpdatePostReqStatus) UnmarshalText

func (s *UpdatePostReqStatus) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (UpdatePostReqStatus) Validate

func (s UpdatePostReqStatus) Validate() error

type UpdatePostRes

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

Jump to

Keyboard shortcuts

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