api

package
v0.0.0-...-1b52060 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddBots

type AddBots struct {
	// List of bot tokens.
	Bots []string `json:"bots"`
}

Ref: #/components/schemas/AddBots

func (*AddBots) Decode

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

Decode decodes AddBots from json.

func (*AddBots) Encode

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

Encode implements json.Marshaler.

func (*AddBots) GetBots

func (s *AddBots) GetBots() []string

GetBots returns the value of Bots.

func (*AddBots) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*AddBots) SetBots

func (s *AddBots) SetBots(val []string)

SetBots sets the value of Bots.

func (*AddBots) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*AddBots) Validate

func (s *AddBots) Validate() error

type ApiKeyAuth

type ApiKeyAuth struct {
	APIKey string
}

func (*ApiKeyAuth) GetAPIKey

func (s *ApiKeyAuth) GetAPIKey() string

GetAPIKey returns the value of APIKey.

func (*ApiKeyAuth) SetAPIKey

func (s *ApiKeyAuth) SetAPIKey(val string)

SetAPIKey sets the value of APIKey.

type ApiVersion

type ApiVersion struct {
	// API version.
	Version string `json:"version"`
	// Git commit SHA.
	CommitSHA string `json:"commitSHA"`
	// Go version.
	GoVersion string `json:"goVersion"`
	// Operating system.
	Os string `json:"os"`
	// Architecture.
	Arch string `json:"arch"`
}

Ref: #/components/schemas/ApiVersion

func (*ApiVersion) Decode

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

Decode decodes ApiVersion from json.

func (*ApiVersion) Encode

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

Encode implements json.Marshaler.

func (*ApiVersion) GetArch

func (s *ApiVersion) GetArch() string

GetArch returns the value of Arch.

func (*ApiVersion) GetCommitSHA

func (s *ApiVersion) GetCommitSHA() string

GetCommitSHA returns the value of CommitSHA.

func (*ApiVersion) GetGoVersion

func (s *ApiVersion) GetGoVersion() string

GetGoVersion returns the value of GoVersion.

func (*ApiVersion) GetOs

func (s *ApiVersion) GetOs() string

GetOs returns the value of Os.

func (*ApiVersion) GetVersion

func (s *ApiVersion) GetVersion() string

GetVersion returns the value of Version.

func (*ApiVersion) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*ApiVersion) SetArch

func (s *ApiVersion) SetArch(val string)

SetArch sets the value of Arch.

func (*ApiVersion) SetCommitSHA

func (s *ApiVersion) SetCommitSHA(val string)

SetCommitSHA sets the value of CommitSHA.

func (*ApiVersion) SetGoVersion

func (s *ApiVersion) SetGoVersion(val string)

SetGoVersion sets the value of GoVersion.

func (*ApiVersion) SetOs

func (s *ApiVersion) SetOs(val string)

SetOs sets the value of Os.

func (*ApiVersion) SetVersion

func (s *ApiVersion) SetVersion(val string)

SetVersion sets the value of Version.

func (*ApiVersion) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type AuthLoginNoContent

type AuthLoginNoContent struct {
	SetCookie string
}

AuthLoginNoContent is response for AuthLogin operation.

func (*AuthLoginNoContent) GetSetCookie

func (s *AuthLoginNoContent) GetSetCookie() string

GetSetCookie returns the value of SetCookie.

func (*AuthLoginNoContent) SetSetCookie

func (s *AuthLoginNoContent) SetSetCookie(val string)

SetSetCookie sets the value of SetCookie.

type AuthLogoutNoContent

type AuthLogoutNoContent struct {
	SetCookie string
}

AuthLogoutNoContent is response for AuthLogout operation.

func (*AuthLogoutNoContent) GetSetCookie

func (s *AuthLogoutNoContent) GetSetCookie() string

GetSetCookie returns the value of SetCookie.

func (*AuthLogoutNoContent) SetSetCookie

func (s *AuthLogoutNoContent) SetSetCookie(val string)

SetSetCookie sets the value of SetCookie.

type AuthSessionNoContent

type AuthSessionNoContent struct{}

AuthSessionNoContent is response for AuthSession operation.

type AuthSessionParams

type AuthSessionParams struct {
	AccessToken OptString
}

AuthSessionParams is parameters of Auth_session operation.

type AuthSessionRes

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

type AuthWsSwitchingProtocols

type AuthWsSwitchingProtocols struct{}

AuthWsSwitchingProtocols is response for AuthWs operation.

type BearerAuth

type BearerAuth struct {
	Token string
}

func (*BearerAuth) GetToken

func (s *BearerAuth) GetToken() string

GetToken returns the value of Token.

func (*BearerAuth) SetToken

func (s *BearerAuth) SetToken(val string)

SetToken sets the value of Token.

type Category

type Category string

Supported file categories. Ref: #/components/schemas/Category

const (
	CategoryArchive  Category = "archive"
	CategoryAudio    Category = "audio"
	CategoryDocument Category = "document"
	CategoryImage    Category = "image"
	CategoryOther    Category = "other"
	CategoryVideo    Category = "video"
)

func (Category) AllValues

func (Category) AllValues() []Category

AllValues returns all Category values.

func (Category) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*Category) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (Category) Validate

func (s Category) Validate() error

type CategoryStats

type CategoryStats struct {
	// Total number of files.
	TotalFiles int64 `json:"totalFiles"`
	// Total size of files in bytes.
	TotalSize int64 `json:"totalSize"`
	// Category name.
	Category CategoryStatsCategory `json:"category"`
}

Statistics for files by category. Ref: #/components/schemas/CategoryStats

func (*CategoryStats) Decode

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

Decode decodes CategoryStats from json.

func (*CategoryStats) Encode

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

Encode implements json.Marshaler.

func (*CategoryStats) GetCategory

func (s *CategoryStats) GetCategory() CategoryStatsCategory

GetCategory returns the value of Category.

func (*CategoryStats) GetTotalFiles

func (s *CategoryStats) GetTotalFiles() int64

GetTotalFiles returns the value of TotalFiles.

func (*CategoryStats) GetTotalSize

func (s *CategoryStats) GetTotalSize() int64

GetTotalSize returns the value of TotalSize.

func (*CategoryStats) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*CategoryStats) SetCategory

func (s *CategoryStats) SetCategory(val CategoryStatsCategory)

SetCategory sets the value of Category.

func (*CategoryStats) SetTotalFiles

func (s *CategoryStats) SetTotalFiles(val int64)

SetTotalFiles sets the value of TotalFiles.

func (*CategoryStats) SetTotalSize

func (s *CategoryStats) SetTotalSize(val int64)

SetTotalSize sets the value of TotalSize.

func (*CategoryStats) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CategoryStats) Validate

func (s *CategoryStats) Validate() error

type CategoryStatsCategory

type CategoryStatsCategory string

Supported file categories.

const (
	CategoryStatsCategoryArchive  CategoryStatsCategory = "archive"
	CategoryStatsCategoryAudio    CategoryStatsCategory = "audio"
	CategoryStatsCategoryDocument CategoryStatsCategory = "document"
	CategoryStatsCategoryImage    CategoryStatsCategory = "image"
	CategoryStatsCategoryOther    CategoryStatsCategory = "other"
	CategoryStatsCategoryVideo    CategoryStatsCategory = "video"
)

func (CategoryStatsCategory) AllValues

AllValues returns all CategoryStatsCategory values.

func (*CategoryStatsCategory) Decode

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

Decode decodes CategoryStatsCategory from json.

func (CategoryStatsCategory) Encode

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

Encode encodes CategoryStatsCategory as json.

func (CategoryStatsCategory) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (CategoryStatsCategory) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*CategoryStatsCategory) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CategoryStatsCategory) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (CategoryStatsCategory) Validate

func (s CategoryStatsCategory) Validate() error

type Channel

type Channel struct {
	// Name of the Telegram channel.
	ChannelName string `json:"channelName"`
	// Unique numeric identifier of the channel.
	ChannelId int64 `json:"channelId"`
}

Telegram channel information. Ref: #/components/schemas/Channel

func (*Channel) Decode

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

Decode decodes Channel from json.

func (*Channel) Encode

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

Encode implements json.Marshaler.

func (*Channel) GetChannelId

func (s *Channel) GetChannelId() int64

GetChannelId returns the value of ChannelId.

func (*Channel) GetChannelName

func (s *Channel) GetChannelName() string

GetChannelName returns the value of ChannelName.

func (*Channel) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Channel) SetChannelId

func (s *Channel) SetChannelId(val int64)

SetChannelId sets the value of ChannelId.

func (*Channel) SetChannelName

func (s *Channel) SetChannelName(val string)

SetChannelName sets the value of ChannelName.

func (*Channel) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type ChannelUpdate

type ChannelUpdate struct {
	// Name of the Telegram channel.
	ChannelName OptString `json:"channelName"`
	// Unique numeric identifier of the channel.
	ChannelId OptInt64 `json:"channelId"`
}

Telegram channel information. Ref: #/components/schemas/ChannelUpdate

func (*ChannelUpdate) Decode

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

Decode decodes ChannelUpdate from json.

func (*ChannelUpdate) Encode

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

Encode implements json.Marshaler.

func (*ChannelUpdate) GetChannelId

func (s *ChannelUpdate) GetChannelId() OptInt64

GetChannelId returns the value of ChannelId.

func (*ChannelUpdate) GetChannelName

func (s *ChannelUpdate) GetChannelName() OptString

GetChannelName returns the value of ChannelName.

func (*ChannelUpdate) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*ChannelUpdate) SetChannelId

func (s *ChannelUpdate) SetChannelId(val OptInt64)

SetChannelId sets the value of ChannelId.

func (*ChannelUpdate) SetChannelName

func (s *ChannelUpdate) SetChannelName(val OptString)

SetChannelName sets the value of ChannelName.

func (*ChannelUpdate) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type Error

type Error struct {
	// Error code.
	Code int `json:"code"`
	// Error message.
	Message string `json:"message"`
}

Standard error response. Ref: #/components/schemas/Error

func (*Error) Decode

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

Decode decodes Error from json.

func (*Error) Encode

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

Encode implements json.Marshaler.

func (*Error) GetCode

func (s *Error) GetCode() int

GetCode returns the value of Code.

func (*Error) GetMessage

func (s *Error) GetMessage() string

GetMessage returns the value of Message.

func (*Error) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Error) SetCode

func (s *Error) SetCode(val int)

SetCode sets the value of Code.

func (*Error) SetMessage

func (s *Error) SetMessage(val string)

SetMessage sets the value of Message.

func (*Error) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type ErrorStatusCode

type ErrorStatusCode struct {
	StatusCode int
	Response   Error
}

ErrorStatusCode wraps Error with StatusCode.

func (*ErrorStatusCode) Error

func (s *ErrorStatusCode) Error() string

func (*ErrorStatusCode) GetResponse

func (s *ErrorStatusCode) GetResponse() Error

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

SetResponse sets the value of Response.

func (*ErrorStatusCode) SetStatusCode

func (s *ErrorStatusCode) SetStatusCode(val int)

SetStatusCode sets the value of StatusCode.

type Event

type Event struct {
	// Event ID.
	ID string `json:"id"`
	// Event type.
	Type string `json:"type"`
	// Event timestamp.
	CreatedAt time.Time `json:"createdAt"`
	// Event Source.
	Source EventSource `json:"source"`
}

Event information. Ref: #/components/schemas/Event

func (*Event) Decode

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

Decode decodes Event from json.

func (*Event) Encode

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

Encode implements json.Marshaler.

func (*Event) GetCreatedAt

func (s *Event) GetCreatedAt() time.Time

GetCreatedAt returns the value of CreatedAt.

func (*Event) GetID

func (s *Event) GetID() string

GetID returns the value of ID.

func (*Event) GetSource

func (s *Event) GetSource() EventSource

GetSource returns the value of Source.

func (*Event) GetType

func (s *Event) GetType() string

GetType returns the value of Type.

func (*Event) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Event) SetCreatedAt

func (s *Event) SetCreatedAt(val time.Time)

SetCreatedAt sets the value of CreatedAt.

func (*Event) SetID

func (s *Event) SetID(val string)

SetID sets the value of ID.

func (*Event) SetSource

func (s *Event) SetSource(val EventSource)

SetSource sets the value of Source.

func (*Event) SetType

func (s *Event) SetType(val string)

SetType sets the value of Type.

func (*Event) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Event) Validate

func (s *Event) Validate() error

type EventSource

type EventSource struct {
	// File ID.
	ID string `json:"id"`
	// File name.
	Name string `json:"name"`
	// File type.
	Type EventSourceType `json:"type"`
	// Parent ID.
	ParentId string `json:"parentId"`
	// Destination Parent ID.
	DestParentId OptString `json:"destParentId"`
}

func (*EventSource) Decode

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

Decode decodes EventSource from json.

func (*EventSource) Encode

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

Encode implements json.Marshaler.

func (*EventSource) GetDestParentId

func (s *EventSource) GetDestParentId() OptString

GetDestParentId returns the value of DestParentId.

func (*EventSource) GetID

func (s *EventSource) GetID() string

GetID returns the value of ID.

func (*EventSource) GetName

func (s *EventSource) GetName() string

GetName returns the value of Name.

func (*EventSource) GetParentId

func (s *EventSource) GetParentId() string

GetParentId returns the value of ParentId.

func (*EventSource) GetType

func (s *EventSource) GetType() EventSourceType

GetType returns the value of Type.

func (*EventSource) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*EventSource) SetDestParentId

func (s *EventSource) SetDestParentId(val OptString)

SetDestParentId sets the value of DestParentId.

func (*EventSource) SetID

func (s *EventSource) SetID(val string)

SetID sets the value of ID.

func (*EventSource) SetName

func (s *EventSource) SetName(val string)

SetName sets the value of Name.

func (*EventSource) SetParentId

func (s *EventSource) SetParentId(val string)

SetParentId sets the value of ParentId.

func (*EventSource) SetType

func (s *EventSource) SetType(val EventSourceType)

SetType sets the value of Type.

func (*EventSource) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*EventSource) Validate

func (s *EventSource) Validate() error

type EventSourceType

type EventSourceType string

File type.

const (
	EventSourceTypeFolder EventSourceType = "folder"
	EventSourceTypeFile   EventSourceType = "file"
)

func (EventSourceType) AllValues

func (EventSourceType) AllValues() []EventSourceType

AllValues returns all EventSourceType values.

func (*EventSourceType) Decode

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

Decode decodes EventSourceType from json.

func (EventSourceType) Encode

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

Encode encodes EventSourceType as json.

func (EventSourceType) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (EventSourceType) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*EventSourceType) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*EventSourceType) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (EventSourceType) Validate

func (s EventSourceType) Validate() error

type File

type File struct {
	// File ID.
	ID OptString `json:"id"`
	// File name.
	Name string `json:"name"`
	// File type.
	Type FileType `json:"type"`
	// File parts.
	Parts []Part `json:"parts"`
	// MIME type.
	MimeType OptString `json:"mimeType"`
	// File category.
	Category OptFileCategory `json:"category"`
	// Channel ID.
	ChannelId OptInt64 `json:"channelId"`
	// File or Folder path.
	Path OptString `json:"path"`
	// Parent folder ID.
	ParentId OptString `json:"parentId"`
	// File size in bytes.
	Size OptInt64 `json:"size"`
	// Encryption status.
	Encrypted OptBool `json:"encrypted"`
	// Last update time.
	UpdatedAt OptDateTime `json:"updatedAt"`
}

File metadata. Ref: #/components/schemas/File

func (*File) Decode

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

Decode decodes File from json.

func (*File) Encode

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

Encode implements json.Marshaler.

func (*File) GetCategory

func (s *File) GetCategory() OptFileCategory

GetCategory returns the value of Category.

func (*File) GetChannelId

func (s *File) GetChannelId() OptInt64

GetChannelId returns the value of ChannelId.

func (*File) GetEncrypted

func (s *File) GetEncrypted() OptBool

GetEncrypted returns the value of Encrypted.

func (*File) GetID

func (s *File) GetID() OptString

GetID returns the value of ID.

func (*File) GetMimeType

func (s *File) GetMimeType() OptString

GetMimeType returns the value of MimeType.

func (*File) GetName

func (s *File) GetName() string

GetName returns the value of Name.

func (*File) GetParentId

func (s *File) GetParentId() OptString

GetParentId returns the value of ParentId.

func (*File) GetParts

func (s *File) GetParts() []Part

GetParts returns the value of Parts.

func (*File) GetPath

func (s *File) GetPath() OptString

GetPath returns the value of Path.

func (*File) GetSize

func (s *File) GetSize() OptInt64

GetSize returns the value of Size.

func (*File) GetType

func (s *File) GetType() FileType

GetType returns the value of Type.

func (*File) GetUpdatedAt

func (s *File) GetUpdatedAt() OptDateTime

GetUpdatedAt returns the value of UpdatedAt.

func (*File) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*File) SetCategory

func (s *File) SetCategory(val OptFileCategory)

SetCategory sets the value of Category.

func (*File) SetChannelId

func (s *File) SetChannelId(val OptInt64)

SetChannelId sets the value of ChannelId.

func (*File) SetEncrypted

func (s *File) SetEncrypted(val OptBool)

SetEncrypted sets the value of Encrypted.

func (*File) SetID

func (s *File) SetID(val OptString)

SetID sets the value of ID.

func (*File) SetMimeType

func (s *File) SetMimeType(val OptString)

SetMimeType sets the value of MimeType.

func (*File) SetName

func (s *File) SetName(val string)

SetName sets the value of Name.

func (*File) SetParentId

func (s *File) SetParentId(val OptString)

SetParentId sets the value of ParentId.

func (*File) SetParts

func (s *File) SetParts(val []Part)

SetParts sets the value of Parts.

func (*File) SetPath

func (s *File) SetPath(val OptString)

SetPath sets the value of Path.

func (*File) SetSize

func (s *File) SetSize(val OptInt64)

SetSize sets the value of Size.

func (*File) SetType

func (s *File) SetType(val FileType)

SetType sets the value of Type.

func (*File) SetUpdatedAt

func (s *File) SetUpdatedAt(val OptDateTime)

SetUpdatedAt sets the value of UpdatedAt.

func (*File) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*File) Validate

func (s *File) Validate() error

type FileCategory

type FileCategory string

Supported file categories.

const (
	FileCategoryArchive  FileCategory = "archive"
	FileCategoryAudio    FileCategory = "audio"
	FileCategoryDocument FileCategory = "document"
	FileCategoryImage    FileCategory = "image"
	FileCategoryOther    FileCategory = "other"
	FileCategoryVideo    FileCategory = "video"
)

func (FileCategory) AllValues

func (FileCategory) AllValues() []FileCategory

AllValues returns all FileCategory values.

func (*FileCategory) Decode

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

Decode decodes FileCategory from json.

func (FileCategory) Encode

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

Encode encodes FileCategory as json.

func (FileCategory) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (FileCategory) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*FileCategory) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FileCategory) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (FileCategory) Validate

func (s FileCategory) Validate() error

type FileCopy

type FileCopy struct {
	// New file name.
	NewName OptString `json:"newName"`
	// Destination path for the copied file.
	Destination string `json:"destination"`
	// Last update time.
	UpdatedAt OptDateTime `json:"updatedAt"`
}

File Copy request. Ref: #/components/schemas/FileCopy

func (*FileCopy) Decode

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

Decode decodes FileCopy from json.

func (*FileCopy) Encode

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

Encode implements json.Marshaler.

func (*FileCopy) GetDestination

func (s *FileCopy) GetDestination() string

GetDestination returns the value of Destination.

func (*FileCopy) GetNewName

func (s *FileCopy) GetNewName() OptString

GetNewName returns the value of NewName.

func (*FileCopy) GetUpdatedAt

func (s *FileCopy) GetUpdatedAt() OptDateTime

GetUpdatedAt returns the value of UpdatedAt.

func (*FileCopy) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileCopy) SetDestination

func (s *FileCopy) SetDestination(val string)

SetDestination sets the value of Destination.

func (*FileCopy) SetNewName

func (s *FileCopy) SetNewName(val OptString)

SetNewName sets the value of NewName.

func (*FileCopy) SetUpdatedAt

func (s *FileCopy) SetUpdatedAt(val OptDateTime)

SetUpdatedAt sets the value of UpdatedAt.

func (*FileCopy) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type FileDelete

type FileDelete struct {
	// Array of file or folders ids to be deleted.
	Ids []string `json:"ids"`
}

Delete operation request. Ref: #/components/schemas/FileDelete

func (*FileDelete) Decode

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

Decode decodes FileDelete from json.

func (*FileDelete) Encode

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

Encode implements json.Marshaler.

func (*FileDelete) GetIds

func (s *FileDelete) GetIds() []string

GetIds returns the value of Ids.

func (*FileDelete) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileDelete) SetIds

func (s *FileDelete) SetIds(val []string)

SetIds sets the value of Ids.

func (*FileDelete) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FileDelete) Validate

func (s *FileDelete) Validate() error

type FileList

type FileList struct {
	// Array of file entries in the current page.
	Items []File `json:"items"`
	// Pagination metadata and total count information.
	Meta FileListMeta `json:"meta"`
}

Paginated file listing response with metadata. Ref: #/components/schemas/FileList

func (*FileList) Decode

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

Decode decodes FileList from json.

func (*FileList) Encode

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

Encode implements json.Marshaler.

func (*FileList) GetItems

func (s *FileList) GetItems() []File

GetItems returns the value of Items.

func (*FileList) GetMeta

func (s *FileList) GetMeta() FileListMeta

GetMeta returns the value of Meta.

func (*FileList) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileList) SetItems

func (s *FileList) SetItems(val []File)

SetItems sets the value of Items.

func (*FileList) SetMeta

func (s *FileList) SetMeta(val FileListMeta)

SetMeta sets the value of Meta.

func (*FileList) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FileList) Validate

func (s *FileList) Validate() error

type FileListMeta

type FileListMeta struct {
	// Total number of items matching the query.
	Count int `json:"count"`
	// Total number of available pages based on limit.
	TotalPages int `json:"totalPages"`
	// Current page number in the pagination.
	CurrentPage int `json:"currentPage"`
}

Pagination metadata containing count, page information.

func (*FileListMeta) Decode

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

Decode decodes FileListMeta from json.

func (*FileListMeta) Encode

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

Encode implements json.Marshaler.

func (*FileListMeta) GetCount

func (s *FileListMeta) GetCount() int

GetCount returns the value of Count.

func (*FileListMeta) GetCurrentPage

func (s *FileListMeta) GetCurrentPage() int

GetCurrentPage returns the value of CurrentPage.

func (*FileListMeta) GetTotalPages

func (s *FileListMeta) GetTotalPages() int

GetTotalPages returns the value of TotalPages.

func (*FileListMeta) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileListMeta) SetCount

func (s *FileListMeta) SetCount(val int)

SetCount sets the value of Count.

func (*FileListMeta) SetCurrentPage

func (s *FileListMeta) SetCurrentPage(val int)

SetCurrentPage sets the value of CurrentPage.

func (*FileListMeta) SetTotalPages

func (s *FileListMeta) SetTotalPages(val int)

SetTotalPages sets the value of TotalPages.

func (*FileListMeta) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FileListMeta) Validate

func (s *FileListMeta) Validate() error

type FileMkDir

type FileMkDir struct {
	// Directory path to be created.
	Path string `json:"path"`
}

Request to create directories. Ref: #/components/schemas/FileMkDir

func (*FileMkDir) Decode

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

Decode decodes FileMkDir from json.

func (*FileMkDir) Encode

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

Encode implements json.Marshaler.

func (*FileMkDir) GetPath

func (s *FileMkDir) GetPath() string

GetPath returns the value of Path.

func (*FileMkDir) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileMkDir) SetPath

func (s *FileMkDir) SetPath(val string)

SetPath sets the value of Path.

func (*FileMkDir) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type FileMove

type FileMove struct {
	// Array of file or folders ids to be moved.
	Ids []string `json:"ids"`
	// Destination parent path or ID where files will be moved to.
	DestinationParent string `json:"destinationParent"`
	// Destination file or folder name.
	DestinationName OptString `json:"destinationName"`
}

Move multiple files by ids or path. Ref: #/components/schemas/FileMove

func (*FileMove) Decode

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

Decode decodes FileMove from json.

func (*FileMove) Encode

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

Encode implements json.Marshaler.

func (*FileMove) GetDestinationName

func (s *FileMove) GetDestinationName() OptString

GetDestinationName returns the value of DestinationName.

func (*FileMove) GetDestinationParent

func (s *FileMove) GetDestinationParent() string

GetDestinationParent returns the value of DestinationParent.

func (*FileMove) GetIds

func (s *FileMove) GetIds() []string

GetIds returns the value of Ids.

func (*FileMove) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileMove) SetDestinationName

func (s *FileMove) SetDestinationName(val OptString)

SetDestinationName sets the value of DestinationName.

func (*FileMove) SetDestinationParent

func (s *FileMove) SetDestinationParent(val string)

SetDestinationParent sets the value of DestinationParent.

func (*FileMove) SetIds

func (s *FileMove) SetIds(val []string)

SetIds sets the value of Ids.

func (*FileMove) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FileMove) Validate

func (s *FileMove) Validate() error

type FilePartsUpdate

type FilePartsUpdate struct {
	// File name.
	Name OptString `json:"name"`
	// Parent folder ID.
	ParentId OptString `json:"parentId"`
	// Channel ID.
	ChannelId OptInt64 `json:"channelId"`
	// Upload ID.
	UploadId OptString `json:"uploadId"`
	// File parts.
	Parts []Part `json:"parts"`
	// File size in bytes.
	Size int64 `json:"size"`
	// Last update time.
	UpdatedAt time.Time `json:"updatedAt"`
}

File parts update request. Ref: #/components/schemas/FilePartsUpdate

func (*FilePartsUpdate) Decode

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

Decode decodes FilePartsUpdate from json.

func (*FilePartsUpdate) Encode

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

Encode implements json.Marshaler.

func (*FilePartsUpdate) GetChannelId

func (s *FilePartsUpdate) GetChannelId() OptInt64

GetChannelId returns the value of ChannelId.

func (*FilePartsUpdate) GetName

func (s *FilePartsUpdate) GetName() OptString

GetName returns the value of Name.

func (*FilePartsUpdate) GetParentId

func (s *FilePartsUpdate) GetParentId() OptString

GetParentId returns the value of ParentId.

func (*FilePartsUpdate) GetParts

func (s *FilePartsUpdate) GetParts() []Part

GetParts returns the value of Parts.

func (*FilePartsUpdate) GetSize

func (s *FilePartsUpdate) GetSize() int64

GetSize returns the value of Size.

func (*FilePartsUpdate) GetUpdatedAt

func (s *FilePartsUpdate) GetUpdatedAt() time.Time

GetUpdatedAt returns the value of UpdatedAt.

func (*FilePartsUpdate) GetUploadId

func (s *FilePartsUpdate) GetUploadId() OptString

GetUploadId returns the value of UploadId.

func (*FilePartsUpdate) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FilePartsUpdate) SetChannelId

func (s *FilePartsUpdate) SetChannelId(val OptInt64)

SetChannelId sets the value of ChannelId.

func (*FilePartsUpdate) SetName

func (s *FilePartsUpdate) SetName(val OptString)

SetName sets the value of Name.

func (*FilePartsUpdate) SetParentId

func (s *FilePartsUpdate) SetParentId(val OptString)

SetParentId sets the value of ParentId.

func (*FilePartsUpdate) SetParts

func (s *FilePartsUpdate) SetParts(val []Part)

SetParts sets the value of Parts.

func (*FilePartsUpdate) SetSize

func (s *FilePartsUpdate) SetSize(val int64)

SetSize sets the value of Size.

func (*FilePartsUpdate) SetUpdatedAt

func (s *FilePartsUpdate) SetUpdatedAt(val time.Time)

SetUpdatedAt sets the value of UpdatedAt.

func (*FilePartsUpdate) SetUploadId

func (s *FilePartsUpdate) SetUploadId(val OptString)

SetUploadId sets the value of UploadId.

func (*FilePartsUpdate) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type FileQueryOperation

type FileQueryOperation string
const (
	FileQueryOperationList FileQueryOperation = "list"
	FileQueryOperationFind FileQueryOperation = "find"
)

func (FileQueryOperation) AllValues

func (FileQueryOperation) AllValues() []FileQueryOperation

AllValues returns all FileQueryOperation values.

func (FileQueryOperation) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*FileQueryOperation) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (FileQueryOperation) Validate

func (s FileQueryOperation) Validate() error

type FileQueryOrder

type FileQueryOrder string
const (
	FileQueryOrderAsc  FileQueryOrder = "asc"
	FileQueryOrderDesc FileQueryOrder = "desc"
)

func (FileQueryOrder) AllValues

func (FileQueryOrder) AllValues() []FileQueryOrder

AllValues returns all FileQueryOrder values.

func (FileQueryOrder) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*FileQueryOrder) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (FileQueryOrder) Validate

func (s FileQueryOrder) Validate() error

type FileQuerySearchType

type FileQuerySearchType string
const (
	FileQuerySearchTypeText  FileQuerySearchType = "text"
	FileQuerySearchTypeRegex FileQuerySearchType = "regex"
)

func (FileQuerySearchType) AllValues

AllValues returns all FileQuerySearchType values.

func (FileQuerySearchType) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*FileQuerySearchType) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (FileQuerySearchType) Validate

func (s FileQuerySearchType) Validate() error

type FileQuerySort

type FileQuerySort string
const (
	FileQuerySortName      FileQuerySort = "name"
	FileQuerySortUpdatedAt FileQuerySort = "updatedAt"
	FileQuerySortSize      FileQuerySort = "size"
	FileQuerySortID        FileQuerySort = "id"
)

func (FileQuerySort) AllValues

func (FileQuerySort) AllValues() []FileQuerySort

AllValues returns all FileQuerySort values.

func (FileQuerySort) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*FileQuerySort) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (FileQuerySort) Validate

func (s FileQuerySort) Validate() error

type FileQueryStatus

type FileQueryStatus string
const (
	FileQueryStatusActive          FileQueryStatus = "active"
	FileQueryStatusPendingDeletion FileQueryStatus = "pending_deletion"
)

func (FileQueryStatus) AllValues

func (FileQueryStatus) AllValues() []FileQueryStatus

AllValues returns all FileQueryStatus values.

func (FileQueryStatus) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*FileQueryStatus) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (FileQueryStatus) Validate

func (s FileQueryStatus) Validate() error

type FileQueryType

type FileQueryType string
const (
	FileQueryTypeFolder FileQueryType = "folder"
	FileQueryTypeFile   FileQueryType = "file"
)

func (FileQueryType) AllValues

func (FileQueryType) AllValues() []FileQueryType

AllValues returns all FileQueryType values.

func (FileQueryType) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*FileQueryType) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (FileQueryType) Validate

func (s FileQueryType) Validate() error

type FileShare

type FileShare struct {
	// Share ID.
	ID string `json:"id"`
	// Indicates if the shared file requires password protection.
	Protected bool `json:"protected"`
	// ID of the user who created the share.
	UserId OptInt64 `json:"userId"`
	// File type.
	Type FileShareType `json:"type"`
	// Name of the shared file or folder.
	Name string `json:"name"`
	// Expiration date and time of the share link.
	ExpiresAt OptDateTime `json:"expiresAt"`
}

File sharing information and settings. Ref: #/components/schemas/FileShare

func (*FileShare) Decode

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

Decode decodes FileShare from json.

func (*FileShare) Encode

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

Encode implements json.Marshaler.

func (*FileShare) GetExpiresAt

func (s *FileShare) GetExpiresAt() OptDateTime

GetExpiresAt returns the value of ExpiresAt.

func (*FileShare) GetID

func (s *FileShare) GetID() string

GetID returns the value of ID.

func (*FileShare) GetName

func (s *FileShare) GetName() string

GetName returns the value of Name.

func (*FileShare) GetProtected

func (s *FileShare) GetProtected() bool

GetProtected returns the value of Protected.

func (*FileShare) GetType

func (s *FileShare) GetType() FileShareType

GetType returns the value of Type.

func (*FileShare) GetUserId

func (s *FileShare) GetUserId() OptInt64

GetUserId returns the value of UserId.

func (*FileShare) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileShare) SetExpiresAt

func (s *FileShare) SetExpiresAt(val OptDateTime)

SetExpiresAt sets the value of ExpiresAt.

func (*FileShare) SetID

func (s *FileShare) SetID(val string)

SetID sets the value of ID.

func (*FileShare) SetName

func (s *FileShare) SetName(val string)

SetName sets the value of Name.

func (*FileShare) SetProtected

func (s *FileShare) SetProtected(val bool)

SetProtected sets the value of Protected.

func (*FileShare) SetType

func (s *FileShare) SetType(val FileShareType)

SetType sets the value of Type.

func (*FileShare) SetUserId

func (s *FileShare) SetUserId(val OptInt64)

SetUserId sets the value of UserId.

func (*FileShare) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FileShare) Validate

func (s *FileShare) Validate() error

type FileShareCreate

type FileShareCreate struct {
	// Share password.
	Password OptString `json:"password"`
	// Share expiration date.
	ExpiresAt OptDateTime `json:"expiresAt"`
}

File share creation request. Ref: #/components/schemas/FileShareCreate

func (*FileShareCreate) Decode

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

Decode decodes FileShareCreate from json.

func (*FileShareCreate) Encode

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

Encode implements json.Marshaler.

func (*FileShareCreate) GetExpiresAt

func (s *FileShareCreate) GetExpiresAt() OptDateTime

GetExpiresAt returns the value of ExpiresAt.

func (*FileShareCreate) GetPassword

func (s *FileShareCreate) GetPassword() OptString

GetPassword returns the value of Password.

func (*FileShareCreate) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileShareCreate) SetExpiresAt

func (s *FileShareCreate) SetExpiresAt(val OptDateTime)

SetExpiresAt sets the value of ExpiresAt.

func (*FileShareCreate) SetPassword

func (s *FileShareCreate) SetPassword(val OptString)

SetPassword sets the value of Password.

func (*FileShareCreate) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type FileShareInfo

type FileShareInfo struct {
	// File name.
	Name string `json:"name"`
	// File type.
	Type FileShareInfoType `json:"type"`
	// Share expiration date.
	ExpiresAt OptDateTime `json:"expiresAt"`
	// Share User ID.
	UserId int64 `json:"userId"`
	// Share Protection Status.
	Protected bool `json:"protected"`
}

Ref: #/components/schemas/FileShareInfo

func (*FileShareInfo) Decode

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

Decode decodes FileShareInfo from json.

func (*FileShareInfo) Encode

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

Encode implements json.Marshaler.

func (*FileShareInfo) GetExpiresAt

func (s *FileShareInfo) GetExpiresAt() OptDateTime

GetExpiresAt returns the value of ExpiresAt.

func (*FileShareInfo) GetName

func (s *FileShareInfo) GetName() string

GetName returns the value of Name.

func (*FileShareInfo) GetProtected

func (s *FileShareInfo) GetProtected() bool

GetProtected returns the value of Protected.

func (*FileShareInfo) GetType

func (s *FileShareInfo) GetType() FileShareInfoType

GetType returns the value of Type.

func (*FileShareInfo) GetUserId

func (s *FileShareInfo) GetUserId() int64

GetUserId returns the value of UserId.

func (*FileShareInfo) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileShareInfo) SetExpiresAt

func (s *FileShareInfo) SetExpiresAt(val OptDateTime)

SetExpiresAt sets the value of ExpiresAt.

func (*FileShareInfo) SetName

func (s *FileShareInfo) SetName(val string)

SetName sets the value of Name.

func (*FileShareInfo) SetProtected

func (s *FileShareInfo) SetProtected(val bool)

SetProtected sets the value of Protected.

func (*FileShareInfo) SetType

func (s *FileShareInfo) SetType(val FileShareInfoType)

SetType sets the value of Type.

func (*FileShareInfo) SetUserId

func (s *FileShareInfo) SetUserId(val int64)

SetUserId sets the value of UserId.

func (*FileShareInfo) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FileShareInfo) Validate

func (s *FileShareInfo) Validate() error

type FileShareInfoType

type FileShareInfoType string

File type.

const (
	FileShareInfoTypeFolder FileShareInfoType = "folder"
	FileShareInfoTypeFile   FileShareInfoType = "file"
)

func (FileShareInfoType) AllValues

func (FileShareInfoType) AllValues() []FileShareInfoType

AllValues returns all FileShareInfoType values.

func (*FileShareInfoType) Decode

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

Decode decodes FileShareInfoType from json.

func (FileShareInfoType) Encode

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

Encode encodes FileShareInfoType as json.

func (FileShareInfoType) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (FileShareInfoType) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*FileShareInfoType) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FileShareInfoType) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (FileShareInfoType) Validate

func (s FileShareInfoType) Validate() error

type FileShareType

type FileShareType string

File type.

const (
	FileShareTypeFolder FileShareType = "folder"
	FileShareTypeFile   FileShareType = "file"
)

func (FileShareType) AllValues

func (FileShareType) AllValues() []FileShareType

AllValues returns all FileShareType values.

func (*FileShareType) Decode

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

Decode decodes FileShareType from json.

func (FileShareType) Encode

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

Encode encodes FileShareType as json.

func (FileShareType) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (FileShareType) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*FileShareType) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FileShareType) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (FileShareType) Validate

func (s FileShareType) Validate() error

type FileType

type FileType string

File type.

const (
	FileTypeFolder FileType = "folder"
	FileTypeFile   FileType = "file"
)

func (FileType) AllValues

func (FileType) AllValues() []FileType

AllValues returns all FileType values.

func (*FileType) Decode

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

Decode decodes FileType from json.

func (FileType) Encode

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

Encode encodes FileType as json.

func (FileType) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (FileType) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*FileType) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FileType) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (FileType) Validate

func (s FileType) Validate() error

type FileUpdate

type FileUpdate struct {
	// File name.
	Name OptString `json:"name"`
	// File parts.
	Parts []Part `json:"parts"`
	// File size in bytes.
	Size OptInt64 `json:"size"`
	// Last update time.
	UpdatedAt OptDateTime `json:"updatedAt"`
}

File update request. Ref: #/components/schemas/FileUpdate

func (*FileUpdate) Decode

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

Decode decodes FileUpdate from json.

func (*FileUpdate) Encode

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

Encode implements json.Marshaler.

func (*FileUpdate) GetName

func (s *FileUpdate) GetName() OptString

GetName returns the value of Name.

func (*FileUpdate) GetParts

func (s *FileUpdate) GetParts() []Part

GetParts returns the value of Parts.

func (*FileUpdate) GetSize

func (s *FileUpdate) GetSize() OptInt64

GetSize returns the value of Size.

func (*FileUpdate) GetUpdatedAt

func (s *FileUpdate) GetUpdatedAt() OptDateTime

GetUpdatedAt returns the value of UpdatedAt.

func (*FileUpdate) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileUpdate) SetName

func (s *FileUpdate) SetName(val OptString)

SetName sets the value of Name.

func (*FileUpdate) SetParts

func (s *FileUpdate) SetParts(val []Part)

SetParts sets the value of Parts.

func (*FileUpdate) SetSize

func (s *FileUpdate) SetSize(val OptInt64)

SetSize sets the value of Size.

func (*FileUpdate) SetUpdatedAt

func (s *FileUpdate) SetUpdatedAt(val OptDateTime)

SetUpdatedAt sets the value of UpdatedAt.

func (*FileUpdate) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type FilesCopyParams

type FilesCopyParams struct {
	ID string
}

FilesCopyParams is parameters of Files_copy operation.

type FilesCreateShareCreated

type FilesCreateShareCreated struct{}

FilesCreateShareCreated is response for FilesCreateShare operation.

type FilesCreateShareParams

type FilesCreateShareParams struct {
	ID string
}

FilesCreateShareParams is parameters of Files_createShare operation.

type FilesDeleteNoContent

type FilesDeleteNoContent struct{}

FilesDeleteNoContent is response for FilesDelete operation.

type FilesDeleteShareNoContent

type FilesDeleteShareNoContent struct{}

FilesDeleteShareNoContent is response for FilesDeleteShare operation.

type FilesDeleteShareParams

type FilesDeleteShareParams struct {
	ID string
}

FilesDeleteShareParams is parameters of Files_deleteShare operation.

type FilesEditShareNoContent

type FilesEditShareNoContent struct{}

FilesEditShareNoContent is response for FilesEditShare operation.

type FilesEditShareParams

type FilesEditShareParams struct {
	ID string
}

FilesEditShareParams is parameters of Files_editShare operation.

type FilesGetByIdParams

type FilesGetByIdParams struct {
	ID string
}

FilesGetByIdParams is parameters of Files_getById operation.

type FilesListParams

type FilesListParams struct {
	// File name filter.
	Name OptString
	// Search query.
	Query OptString
	// Search type.
	SearchType OptFileQuerySearchType
	// File type.
	Type OptFileQueryType
	// File path.
	Path OptString
	// Operation.
	Operation OptFileQueryOperation
	// File Status.
	Status OptFileQueryStatus
	// Enable deep search.
	DeepSearch OptBool
	// Show shared files.
	Shared OptBool
	// Parent folder ID.
	ParentId OptString
	// File category.
	Category []Category
	// UpdatedAt Filter supports operator eq, gt, lt, gte, lte.
	UpdatedAt OptString
	// Sort field.
	Sort OptFileQuerySort
	// Sort order.
	Order OptFileQueryOrder
	// Items per page.
	Limit OptInt
	// Page number.
	Page OptInt
}

FilesListParams is parameters of Files_list operation.

type FilesMkdirNoContent

type FilesMkdirNoContent struct{}

FilesMkdirNoContent is response for FilesMkdir operation.

type FilesMoveNoContent

type FilesMoveNoContent struct{}

FilesMoveNoContent is response for FilesMove operation.

type FilesShareByidParams

type FilesShareByidParams struct {
	ID string
}

FilesShareByidParams is parameters of Files_shareByid operation.

type FilesStreamDownload

type FilesStreamDownload string
const (
	FilesStreamDownload0 FilesStreamDownload = "0"
	FilesStreamDownload1 FilesStreamDownload = "1"
)

func (FilesStreamDownload) AllValues

AllValues returns all FilesStreamDownload values.

func (FilesStreamDownload) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*FilesStreamDownload) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (FilesStreamDownload) Validate

func (s FilesStreamDownload) Validate() error

type FilesStreamOK

type FilesStreamOK struct {
	Data io.Reader
}

func (FilesStreamOK) Read

func (s FilesStreamOK) Read(p []byte) (n int, err error)

Read reads data from the Data reader.

Kept to satisfy the io.Reader interface.

type FilesStreamOKAcceptRanges

type FilesStreamOKAcceptRanges string
const (
	FilesStreamOKAcceptRangesBytes FilesStreamOKAcceptRanges = "bytes"
)

func (FilesStreamOKAcceptRanges) AllValues

AllValues returns all FilesStreamOKAcceptRanges values.

func (FilesStreamOKAcceptRanges) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*FilesStreamOKAcceptRanges) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (FilesStreamOKAcceptRanges) Validate

func (s FilesStreamOKAcceptRanges) Validate() error

type FilesStreamOKHeaders

type FilesStreamOKHeaders struct {
	AcceptRanges       FilesStreamOKAcceptRanges
	ContentDisposition string
	ContentLength      string
	ContentRange       OptString
	ContentType        string
	Etag               string
	LastModified       string
	Response           FilesStreamOK
}

FilesStreamOKHeaders wraps FilesStreamOK with response headers.

func (*FilesStreamOKHeaders) GetAcceptRanges

func (s *FilesStreamOKHeaders) GetAcceptRanges() FilesStreamOKAcceptRanges

GetAcceptRanges returns the value of AcceptRanges.

func (*FilesStreamOKHeaders) GetContentDisposition

func (s *FilesStreamOKHeaders) GetContentDisposition() string

GetContentDisposition returns the value of ContentDisposition.

func (*FilesStreamOKHeaders) GetContentLength

func (s *FilesStreamOKHeaders) GetContentLength() string

GetContentLength returns the value of ContentLength.

func (*FilesStreamOKHeaders) GetContentRange

func (s *FilesStreamOKHeaders) GetContentRange() OptString

GetContentRange returns the value of ContentRange.

func (*FilesStreamOKHeaders) GetContentType

func (s *FilesStreamOKHeaders) GetContentType() string

GetContentType returns the value of ContentType.

func (*FilesStreamOKHeaders) GetEtag

func (s *FilesStreamOKHeaders) GetEtag() string

GetEtag returns the value of Etag.

func (*FilesStreamOKHeaders) GetLastModified

func (s *FilesStreamOKHeaders) GetLastModified() string

GetLastModified returns the value of LastModified.

func (*FilesStreamOKHeaders) GetResponse

func (s *FilesStreamOKHeaders) GetResponse() FilesStreamOK

GetResponse returns the value of Response.

func (*FilesStreamOKHeaders) SetAcceptRanges

func (s *FilesStreamOKHeaders) SetAcceptRanges(val FilesStreamOKAcceptRanges)

SetAcceptRanges sets the value of AcceptRanges.

func (*FilesStreamOKHeaders) SetContentDisposition

func (s *FilesStreamOKHeaders) SetContentDisposition(val string)

SetContentDisposition sets the value of ContentDisposition.

func (*FilesStreamOKHeaders) SetContentLength

func (s *FilesStreamOKHeaders) SetContentLength(val string)

SetContentLength sets the value of ContentLength.

func (*FilesStreamOKHeaders) SetContentRange

func (s *FilesStreamOKHeaders) SetContentRange(val OptString)

SetContentRange sets the value of ContentRange.

func (*FilesStreamOKHeaders) SetContentType

func (s *FilesStreamOKHeaders) SetContentType(val string)

SetContentType sets the value of ContentType.

func (*FilesStreamOKHeaders) SetEtag

func (s *FilesStreamOKHeaders) SetEtag(val string)

SetEtag sets the value of Etag.

func (*FilesStreamOKHeaders) SetLastModified

func (s *FilesStreamOKHeaders) SetLastModified(val string)

SetLastModified sets the value of LastModified.

func (*FilesStreamOKHeaders) SetResponse

func (s *FilesStreamOKHeaders) SetResponse(val FilesStreamOK)

SetResponse sets the value of Response.

func (*FilesStreamOKHeaders) Validate

func (s *FilesStreamOKHeaders) Validate() error

type FilesStreamParams

type FilesStreamParams struct {
	ID          string
	Name        string
	Download    OptFilesStreamDownload
	Hash        OptString
	Range       OptString
	AccessToken OptString
}

FilesStreamParams is parameters of Files_stream operation.

type FilesStreamPartialContent

type FilesStreamPartialContent struct {
	Data io.Reader
}

func (FilesStreamPartialContent) Read

func (s FilesStreamPartialContent) Read(p []byte) (n int, err error)

Read reads data from the Data reader.

Kept to satisfy the io.Reader interface.

type FilesStreamPartialContentAcceptRanges

type FilesStreamPartialContentAcceptRanges string
const (
	FilesStreamPartialContentAcceptRangesBytes FilesStreamPartialContentAcceptRanges = "bytes"
)

func (FilesStreamPartialContentAcceptRanges) AllValues

AllValues returns all FilesStreamPartialContentAcceptRanges values.

func (FilesStreamPartialContentAcceptRanges) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*FilesStreamPartialContentAcceptRanges) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (FilesStreamPartialContentAcceptRanges) Validate

type FilesStreamPartialContentHeaders

type FilesStreamPartialContentHeaders struct {
	AcceptRanges       FilesStreamPartialContentAcceptRanges
	ContentDisposition string
	ContentLength      string
	ContentRange       OptString
	ContentType        string
	Etag               string
	LastModified       string
	Response           FilesStreamPartialContent
}

FilesStreamPartialContentHeaders wraps FilesStreamPartialContent with response headers.

func (*FilesStreamPartialContentHeaders) GetAcceptRanges

GetAcceptRanges returns the value of AcceptRanges.

func (*FilesStreamPartialContentHeaders) GetContentDisposition

func (s *FilesStreamPartialContentHeaders) GetContentDisposition() string

GetContentDisposition returns the value of ContentDisposition.

func (*FilesStreamPartialContentHeaders) GetContentLength

func (s *FilesStreamPartialContentHeaders) GetContentLength() string

GetContentLength returns the value of ContentLength.

func (*FilesStreamPartialContentHeaders) GetContentRange

func (s *FilesStreamPartialContentHeaders) GetContentRange() OptString

GetContentRange returns the value of ContentRange.

func (*FilesStreamPartialContentHeaders) GetContentType

func (s *FilesStreamPartialContentHeaders) GetContentType() string

GetContentType returns the value of ContentType.

func (*FilesStreamPartialContentHeaders) GetEtag

GetEtag returns the value of Etag.

func (*FilesStreamPartialContentHeaders) GetLastModified

func (s *FilesStreamPartialContentHeaders) GetLastModified() string

GetLastModified returns the value of LastModified.

func (*FilesStreamPartialContentHeaders) GetResponse

GetResponse returns the value of Response.

func (*FilesStreamPartialContentHeaders) SetAcceptRanges

SetAcceptRanges sets the value of AcceptRanges.

func (*FilesStreamPartialContentHeaders) SetContentDisposition

func (s *FilesStreamPartialContentHeaders) SetContentDisposition(val string)

SetContentDisposition sets the value of ContentDisposition.

func (*FilesStreamPartialContentHeaders) SetContentLength

func (s *FilesStreamPartialContentHeaders) SetContentLength(val string)

SetContentLength sets the value of ContentLength.

func (*FilesStreamPartialContentHeaders) SetContentRange

func (s *FilesStreamPartialContentHeaders) SetContentRange(val OptString)

SetContentRange sets the value of ContentRange.

func (*FilesStreamPartialContentHeaders) SetContentType

func (s *FilesStreamPartialContentHeaders) SetContentType(val string)

SetContentType sets the value of ContentType.

func (*FilesStreamPartialContentHeaders) SetEtag

func (s *FilesStreamPartialContentHeaders) SetEtag(val string)

SetEtag sets the value of Etag.

func (*FilesStreamPartialContentHeaders) SetLastModified

func (s *FilesStreamPartialContentHeaders) SetLastModified(val string)

SetLastModified sets the value of LastModified.

func (*FilesStreamPartialContentHeaders) SetResponse

SetResponse sets the value of Response.

func (*FilesStreamPartialContentHeaders) Validate

type FilesStreamRes

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

type FilesUpdateParams

type FilesUpdateParams struct {
	ID string
}

FilesUpdateParams is parameters of Files_update operation.

type FilesUpdatePartsNoContent

type FilesUpdatePartsNoContent struct{}

FilesUpdatePartsNoContent is response for FilesUpdateParts operation.

type FilesUpdatePartsParams

type FilesUpdatePartsParams struct {
	ID string
}

FilesUpdatePartsParams is parameters of Files_updateParts operation.

type Handler

type Handler interface {
	// AuthLogin implements Auth_login operation.
	//
	// Login.
	//
	// POST /auth/login
	AuthLogin(ctx context.Context, req *SessionCreate) (*AuthLoginNoContent, error)
	// AuthLogout implements Auth_logout operation.
	//
	// Logout.
	//
	// POST /auth/logout
	AuthLogout(ctx context.Context) (*AuthLogoutNoContent, error)
	// AuthSession implements Auth_session operation.
	//
	// Get session information.
	//
	// GET /auth/session
	AuthSession(ctx context.Context, params AuthSessionParams) (AuthSessionRes, error)
	// AuthWs implements Auth_ws operation.
	//
	// Websocket QR Login.
	//
	// GET /auth/ws
	AuthWs(ctx context.Context) error
	// EventsGetEvents implements Events_getEvents operation.
	//
	// Get events.
	//
	// GET /events
	EventsGetEvents(ctx context.Context) ([]Event, error)
	// FilesCategoryStats implements Files_categoryStats operation.
	//
	// Get category stats.
	//
	// GET /files/categories
	FilesCategoryStats(ctx context.Context) ([]CategoryStats, error)
	// FilesCopy implements Files_copy operation.
	//
	// Copy file.
	//
	// POST /files/{id}/copy
	FilesCopy(ctx context.Context, req *FileCopy, params FilesCopyParams) (*File, error)
	// FilesCreate implements Files_create operation.
	//
	// Create a new file.
	//
	// POST /files
	FilesCreate(ctx context.Context, req *File) (*File, error)
	// FilesCreateShare implements Files_createShare operation.
	//
	// Create a share for the file.
	//
	// POST /files/{id}/share
	FilesCreateShare(ctx context.Context, req *FileShareCreate, params FilesCreateShareParams) error
	// FilesDelete implements Files_delete operation.
	//
	// Delete files.
	//
	// POST /files/delete
	FilesDelete(ctx context.Context, req *FileDelete) error
	// FilesDeleteShare implements Files_deleteShare operation.
	//
	// Delete share.
	//
	// DELETE /files/{id}/share
	FilesDeleteShare(ctx context.Context, params FilesDeleteShareParams) error
	// FilesEditShare implements Files_editShare operation.
	//
	// Edit share.
	//
	// PATCH /files/{id}/share
	FilesEditShare(ctx context.Context, req *FileShareCreate, params FilesEditShareParams) error
	// FilesGetById implements Files_getById operation.
	//
	// Get file by ID.
	//
	// GET /files/{id}
	FilesGetById(ctx context.Context, params FilesGetByIdParams) (*File, error)
	// FilesList implements Files_list operation.
	//
	// List all files.
	//
	// GET /files
	FilesList(ctx context.Context, params FilesListParams) (*FileList, error)
	// FilesMkdir implements Files_mkdir operation.
	//
	// Create Folders.
	//
	// POST /files/mkdir
	FilesMkdir(ctx context.Context, req *FileMkDir) error
	// FilesMove implements Files_move operation.
	//
	// Move files.
	//
	// POST /files/move
	FilesMove(ctx context.Context, req *FileMove) error
	// FilesShareByid implements Files_shareByid operation.
	//
	// Get share by file ID.
	//
	// GET /files/{id}/share
	FilesShareByid(ctx context.Context, params FilesShareByidParams) (*FileShare, error)
	// FilesStream implements Files_stream operation.
	//
	// Stream or Download file.
	//
	// GET /files/{id}/{name}
	FilesStream(ctx context.Context, params FilesStreamParams) (FilesStreamRes, error)
	// FilesUpdate implements Files_update operation.
	//
	// Update file.
	//
	// PATCH /files/{id}
	FilesUpdate(ctx context.Context, req *FileUpdate, params FilesUpdateParams) (*File, error)
	// FilesUpdateParts implements Files_updateParts operation.
	//
	// Update file parts.
	//
	// PUT /files/{id}/parts
	FilesUpdateParts(ctx context.Context, req *FilePartsUpdate, params FilesUpdatePartsParams) error
	// SharesGetById implements Shares_getById operation.
	//
	// Get share by ID.
	//
	// GET /shares/{id}
	SharesGetById(ctx context.Context, params SharesGetByIdParams) (*FileShareInfo, error)
	// SharesListFiles implements Shares_listFiles operation.
	//
	// List files in share.
	//
	// GET /shares/{id}/files
	SharesListFiles(ctx context.Context, params SharesListFilesParams) (*FileList, error)
	// SharesStream implements Shares_stream operation.
	//
	// Stream or Download shared file.
	//
	// GET /shares/{id}/files/{fileId}/{name}
	SharesStream(ctx context.Context, params SharesStreamParams) (SharesStreamRes, error)
	// SharesUnlock implements Shares_unlock operation.
	//
	// Unlock share.
	//
	// POST /shares/{id}/unlock
	SharesUnlock(ctx context.Context, req *ShareUnlock, params SharesUnlockParams) error
	// UploadsDelete implements Uploads_delete operation.
	//
	// Delete uploaded file.
	//
	// DELETE /uploads/{id}
	UploadsDelete(ctx context.Context, params UploadsDeleteParams) error
	// UploadsPartsById implements Uploads_partsById operation.
	//
	// Get uploaded parts by ID.
	//
	// GET /uploads/{id}
	UploadsPartsById(ctx context.Context, params UploadsPartsByIdParams) ([]UploadPart, error)
	// UploadsStats implements Uploads_stats operation.
	//
	// Get upload stats.
	//
	// GET /uploads/stats
	UploadsStats(ctx context.Context, params UploadsStatsParams) ([]UploadStats, error)
	// UploadsUpload implements Uploads_upload operation.
	//
	// Upload file.
	//
	// POST /uploads/{id}
	UploadsUpload(ctx context.Context, req *UploadsUploadReqWithContentType, params UploadsUploadParams) (*UploadPart, error)
	// UsersAddBots implements Users_addBots operation.
	//
	// Add bots to user account.
	//
	// POST /users/bots
	UsersAddBots(ctx context.Context, req *AddBots) error
	// UsersListChannels implements Users_listChannels operation.
	//
	// List user channels.
	//
	// GET /users/channels
	UsersListChannels(ctx context.Context) ([]Channel, error)
	// UsersListSessions implements Users_listSessions operation.
	//
	// List user sessions.
	//
	// GET /users/sessions
	UsersListSessions(ctx context.Context) ([]UserSession, error)
	// UsersProfileImage implements Users_profileImage operation.
	//
	// Get user profile photo.
	//
	// GET /users/profile/{name}
	UsersProfileImage(ctx context.Context, params UsersProfileImageParams) (*UsersProfileImageOKHeaders, error)
	// UsersRemoveBots implements Users_removeBots operation.
	//
	// Remove bots from user account.
	//
	// DELETE /users/bots
	UsersRemoveBots(ctx context.Context) error
	// UsersRemoveSession implements Users_removeSession operation.
	//
	// Remove user session.
	//
	// DELETE /users/sessions/{id}
	UsersRemoveSession(ctx context.Context, params UsersRemoveSessionParams) error
	// UsersStats implements Users_stats operation.
	//
	// Get user config.
	//
	// GET /users/config
	UsersStats(ctx context.Context) (*UserConfig, error)
	// UsersSyncChannels implements Users_syncChannels operation.
	//
	// Sync user channels.
	//
	// PATCH /users/channels/sync
	UsersSyncChannels(ctx context.Context) error
	// UsersUpdateChannel implements Users_updateChannel operation.
	//
	// Update user channel.
	//
	// PATCH /users/channels
	UsersUpdateChannel(ctx context.Context, req *ChannelUpdate) error
	// VersionVersion implements Version_version operation.
	//
	// Get API version.
	//
	// GET /version
	VersionVersion(ctx context.Context) (*ApiVersion, 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 Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OperationName

type OperationName = string

OperationName is the ogen operation name

const (
	AuthLoginOperation          OperationName = "AuthLogin"
	AuthLogoutOperation         OperationName = "AuthLogout"
	AuthSessionOperation        OperationName = "AuthSession"
	AuthWsOperation             OperationName = "AuthWs"
	EventsGetEventsOperation    OperationName = "EventsGetEvents"
	FilesCategoryStatsOperation OperationName = "FilesCategoryStats"
	FilesCopyOperation          OperationName = "FilesCopy"
	FilesCreateOperation        OperationName = "FilesCreate"
	FilesCreateShareOperation   OperationName = "FilesCreateShare"
	FilesDeleteOperation        OperationName = "FilesDelete"
	FilesDeleteShareOperation   OperationName = "FilesDeleteShare"
	FilesEditShareOperation     OperationName = "FilesEditShare"
	FilesGetByIdOperation       OperationName = "FilesGetById"
	FilesListOperation          OperationName = "FilesList"
	FilesMkdirOperation         OperationName = "FilesMkdir"
	FilesMoveOperation          OperationName = "FilesMove"
	FilesShareByidOperation     OperationName = "FilesShareByid"
	FilesStreamOperation        OperationName = "FilesStream"
	FilesUpdateOperation        OperationName = "FilesUpdate"
	FilesUpdatePartsOperation   OperationName = "FilesUpdateParts"
	SharesGetByIdOperation      OperationName = "SharesGetById"
	SharesListFilesOperation    OperationName = "SharesListFiles"
	SharesStreamOperation       OperationName = "SharesStream"
	SharesUnlockOperation       OperationName = "SharesUnlock"
	UploadsDeleteOperation      OperationName = "UploadsDelete"
	UploadsPartsByIdOperation   OperationName = "UploadsPartsById"
	UploadsStatsOperation       OperationName = "UploadsStats"
	UploadsUploadOperation      OperationName = "UploadsUpload"
	UsersAddBotsOperation       OperationName = "UsersAddBots"
	UsersListChannelsOperation  OperationName = "UsersListChannels"
	UsersListSessionsOperation  OperationName = "UsersListSessions"
	UsersProfileImageOperation  OperationName = "UsersProfileImage"
	UsersRemoveBotsOperation    OperationName = "UsersRemoveBots"
	UsersRemoveSessionOperation OperationName = "UsersRemoveSession"
	UsersStatsOperation         OperationName = "UsersStats"
	UsersSyncChannelsOperation  OperationName = "UsersSyncChannels"
	UsersUpdateChannelOperation OperationName = "UsersUpdateChannel"
	VersionVersionOperation     OperationName = "VersionVersion"
)

type OptBool

type OptBool struct {
	Value bool
	Set   bool
}

OptBool is optional bool.

func NewOptBool

func NewOptBool(v bool) OptBool

NewOptBool returns new OptBool with value set to v.

func (*OptBool) Decode

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

Decode decodes bool from json.

func (OptBool) Encode

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

Encode encodes bool as json.

func (OptBool) Get

func (o OptBool) Get() (v bool, ok bool)

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

func (OptBool) IsSet

func (o OptBool) IsSet() bool

IsSet returns true if OptBool was set.

func (OptBool) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptBool) Or

func (o OptBool) Or(d bool) bool

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

func (*OptBool) Reset

func (o *OptBool) Reset()

Reset unsets value.

func (*OptBool) SetTo

func (o *OptBool) SetTo(v bool)

SetTo sets value to v.

func (*OptBool) UnmarshalJSON

func (s *OptBool) 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 OptFileCategory

type OptFileCategory struct {
	Value FileCategory
	Set   bool
}

OptFileCategory is optional FileCategory.

func NewOptFileCategory

func NewOptFileCategory(v FileCategory) OptFileCategory

NewOptFileCategory returns new OptFileCategory with value set to v.

func (*OptFileCategory) Decode

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

Decode decodes FileCategory from json.

func (OptFileCategory) Encode

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

Encode encodes FileCategory as json.

func (OptFileCategory) Get

func (o OptFileCategory) Get() (v FileCategory, ok bool)

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

func (OptFileCategory) IsSet

func (o OptFileCategory) IsSet() bool

IsSet returns true if OptFileCategory was set.

func (OptFileCategory) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptFileCategory) Or

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

func (*OptFileCategory) Reset

func (o *OptFileCategory) Reset()

Reset unsets value.

func (*OptFileCategory) SetTo

func (o *OptFileCategory) SetTo(v FileCategory)

SetTo sets value to v.

func (*OptFileCategory) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptFileQueryOperation

type OptFileQueryOperation struct {
	Value FileQueryOperation
	Set   bool
}

OptFileQueryOperation is optional FileQueryOperation.

func NewOptFileQueryOperation

func NewOptFileQueryOperation(v FileQueryOperation) OptFileQueryOperation

NewOptFileQueryOperation returns new OptFileQueryOperation with value set to v.

func (OptFileQueryOperation) Get

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

func (OptFileQueryOperation) IsSet

func (o OptFileQueryOperation) IsSet() bool

IsSet returns true if OptFileQueryOperation was set.

func (OptFileQueryOperation) Or

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

func (*OptFileQueryOperation) Reset

func (o *OptFileQueryOperation) Reset()

Reset unsets value.

func (*OptFileQueryOperation) SetTo

SetTo sets value to v.

type OptFileQueryOrder

type OptFileQueryOrder struct {
	Value FileQueryOrder
	Set   bool
}

OptFileQueryOrder is optional FileQueryOrder.

func NewOptFileQueryOrder

func NewOptFileQueryOrder(v FileQueryOrder) OptFileQueryOrder

NewOptFileQueryOrder returns new OptFileQueryOrder with value set to v.

func (OptFileQueryOrder) Get

func (o OptFileQueryOrder) Get() (v FileQueryOrder, ok bool)

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

func (OptFileQueryOrder) IsSet

func (o OptFileQueryOrder) IsSet() bool

IsSet returns true if OptFileQueryOrder was set.

func (OptFileQueryOrder) Or

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

func (*OptFileQueryOrder) Reset

func (o *OptFileQueryOrder) Reset()

Reset unsets value.

func (*OptFileQueryOrder) SetTo

func (o *OptFileQueryOrder) SetTo(v FileQueryOrder)

SetTo sets value to v.

type OptFileQuerySearchType

type OptFileQuerySearchType struct {
	Value FileQuerySearchType
	Set   bool
}

OptFileQuerySearchType is optional FileQuerySearchType.

func NewOptFileQuerySearchType

func NewOptFileQuerySearchType(v FileQuerySearchType) OptFileQuerySearchType

NewOptFileQuerySearchType returns new OptFileQuerySearchType with value set to v.

func (OptFileQuerySearchType) Get

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

func (OptFileQuerySearchType) IsSet

func (o OptFileQuerySearchType) IsSet() bool

IsSet returns true if OptFileQuerySearchType was set.

func (OptFileQuerySearchType) Or

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

func (*OptFileQuerySearchType) Reset

func (o *OptFileQuerySearchType) Reset()

Reset unsets value.

func (*OptFileQuerySearchType) SetTo

SetTo sets value to v.

type OptFileQuerySort

type OptFileQuerySort struct {
	Value FileQuerySort
	Set   bool
}

OptFileQuerySort is optional FileQuerySort.

func NewOptFileQuerySort

func NewOptFileQuerySort(v FileQuerySort) OptFileQuerySort

NewOptFileQuerySort returns new OptFileQuerySort with value set to v.

func (OptFileQuerySort) Get

func (o OptFileQuerySort) Get() (v FileQuerySort, ok bool)

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

func (OptFileQuerySort) IsSet

func (o OptFileQuerySort) IsSet() bool

IsSet returns true if OptFileQuerySort was set.

func (OptFileQuerySort) Or

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

func (*OptFileQuerySort) Reset

func (o *OptFileQuerySort) Reset()

Reset unsets value.

func (*OptFileQuerySort) SetTo

func (o *OptFileQuerySort) SetTo(v FileQuerySort)

SetTo sets value to v.

type OptFileQueryStatus

type OptFileQueryStatus struct {
	Value FileQueryStatus
	Set   bool
}

OptFileQueryStatus is optional FileQueryStatus.

func NewOptFileQueryStatus

func NewOptFileQueryStatus(v FileQueryStatus) OptFileQueryStatus

NewOptFileQueryStatus returns new OptFileQueryStatus with value set to v.

func (OptFileQueryStatus) Get

func (o OptFileQueryStatus) Get() (v FileQueryStatus, ok bool)

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

func (OptFileQueryStatus) IsSet

func (o OptFileQueryStatus) IsSet() bool

IsSet returns true if OptFileQueryStatus was set.

func (OptFileQueryStatus) Or

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

func (*OptFileQueryStatus) Reset

func (o *OptFileQueryStatus) Reset()

Reset unsets value.

func (*OptFileQueryStatus) SetTo

func (o *OptFileQueryStatus) SetTo(v FileQueryStatus)

SetTo sets value to v.

type OptFileQueryType

type OptFileQueryType struct {
	Value FileQueryType
	Set   bool
}

OptFileQueryType is optional FileQueryType.

func NewOptFileQueryType

func NewOptFileQueryType(v FileQueryType) OptFileQueryType

NewOptFileQueryType returns new OptFileQueryType with value set to v.

func (OptFileQueryType) Get

func (o OptFileQueryType) Get() (v FileQueryType, ok bool)

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

func (OptFileQueryType) IsSet

func (o OptFileQueryType) IsSet() bool

IsSet returns true if OptFileQueryType was set.

func (OptFileQueryType) Or

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

func (*OptFileQueryType) Reset

func (o *OptFileQueryType) Reset()

Reset unsets value.

func (*OptFileQueryType) SetTo

func (o *OptFileQueryType) SetTo(v FileQueryType)

SetTo sets value to v.

type OptFilesStreamDownload

type OptFilesStreamDownload struct {
	Value FilesStreamDownload
	Set   bool
}

OptFilesStreamDownload is optional FilesStreamDownload.

func NewOptFilesStreamDownload

func NewOptFilesStreamDownload(v FilesStreamDownload) OptFilesStreamDownload

NewOptFilesStreamDownload returns new OptFilesStreamDownload with value set to v.

func (OptFilesStreamDownload) Get

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

func (OptFilesStreamDownload) IsSet

func (o OptFilesStreamDownload) IsSet() bool

IsSet returns true if OptFilesStreamDownload was set.

func (OptFilesStreamDownload) Or

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

func (*OptFilesStreamDownload) Reset

func (o *OptFilesStreamDownload) Reset()

Reset unsets value.

func (*OptFilesStreamDownload) SetTo

SetTo sets value to v.

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 OptShareQueryOrder

type OptShareQueryOrder struct {
	Value ShareQueryOrder
	Set   bool
}

OptShareQueryOrder is optional ShareQueryOrder.

func NewOptShareQueryOrder

func NewOptShareQueryOrder(v ShareQueryOrder) OptShareQueryOrder

NewOptShareQueryOrder returns new OptShareQueryOrder with value set to v.

func (OptShareQueryOrder) Get

func (o OptShareQueryOrder) Get() (v ShareQueryOrder, ok bool)

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

func (OptShareQueryOrder) IsSet

func (o OptShareQueryOrder) IsSet() bool

IsSet returns true if OptShareQueryOrder was set.

func (OptShareQueryOrder) Or

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

func (*OptShareQueryOrder) Reset

func (o *OptShareQueryOrder) Reset()

Reset unsets value.

func (*OptShareQueryOrder) SetTo

func (o *OptShareQueryOrder) SetTo(v ShareQueryOrder)

SetTo sets value to v.

type OptShareQuerySort

type OptShareQuerySort struct {
	Value ShareQuerySort
	Set   bool
}

OptShareQuerySort is optional ShareQuerySort.

func NewOptShareQuerySort

func NewOptShareQuerySort(v ShareQuerySort) OptShareQuerySort

NewOptShareQuerySort returns new OptShareQuerySort with value set to v.

func (OptShareQuerySort) Get

func (o OptShareQuerySort) Get() (v ShareQuerySort, ok bool)

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

func (OptShareQuerySort) IsSet

func (o OptShareQuerySort) IsSet() bool

IsSet returns true if OptShareQuerySort was set.

func (OptShareQuerySort) Or

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

func (*OptShareQuerySort) Reset

func (o *OptShareQuerySort) Reset()

Reset unsets value.

func (*OptShareQuerySort) SetTo

func (o *OptShareQuerySort) SetTo(v ShareQuerySort)

SetTo sets value to v.

type OptSharesStreamDownload

type OptSharesStreamDownload struct {
	Value SharesStreamDownload
	Set   bool
}

OptSharesStreamDownload is optional SharesStreamDownload.

func NewOptSharesStreamDownload

func NewOptSharesStreamDownload(v SharesStreamDownload) OptSharesStreamDownload

NewOptSharesStreamDownload returns new OptSharesStreamDownload with value set to v.

func (OptSharesStreamDownload) Get

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

func (OptSharesStreamDownload) IsSet

func (o OptSharesStreamDownload) IsSet() bool

IsSet returns true if OptSharesStreamDownload was set.

func (OptSharesStreamDownload) Or

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

func (*OptSharesStreamDownload) Reset

func (o *OptSharesStreamDownload) Reset()

Reset unsets value.

func (*OptSharesStreamDownload) SetTo

SetTo sets value to v.

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 Option

type Option interface {
	ServerOption
}

Option is config option.

type Part

type Part struct {
	// Part ID.
	ID int `json:"id"`
	// Encryption salt.
	Salt OptString `json:"salt"`
}

File part information. Ref: #/components/schemas/Part

func (*Part) Decode

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

Decode decodes Part from json.

func (*Part) Encode

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

Encode implements json.Marshaler.

func (*Part) GetID

func (s *Part) GetID() int

GetID returns the value of ID.

func (*Part) GetSalt

func (s *Part) GetSalt() OptString

GetSalt returns the value of Salt.

func (*Part) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Part) SetID

func (s *Part) SetID(val int)

SetID sets the value of ID.

func (*Part) SetSalt

func (s *Part) SetSalt(val OptString)

SetSalt sets the value of Salt.

func (*Part) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

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 SecurityHandler

type SecurityHandler interface {
	// HandleApiKeyAuth handles ApiKeyAuth security.
	HandleApiKeyAuth(ctx context.Context, operationName OperationName, t ApiKeyAuth) (context.Context, error)
	// HandleBearerAuth handles BearerAuth security.
	HandleBearerAuth(ctx context.Context, operationName OperationName, t BearerAuth) (context.Context, error)
}

SecurityHandler is handler for security parameters.

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, sec SecurityHandler, 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 Session

type Session struct {
	// User's display name or full name.
	Name string `json:"name"`
	// Telegram username without @ symbol.
	UserName string `json:"userName"`
	// Telegram user ID (unique identifier).
	UserId int64 `json:"userId"`
	// Premium subscription status.
	IsPremium bool `json:"isPremium"`
	// Session hash for verification and security.
	Hash string `json:"hash"`
	// Session expiration date.
	Expires time.Time `json:"expires"`
}

User session information containing authentication and profile details. Ref: #/components/schemas/Session

func (*Session) Decode

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

Decode decodes Session from json.

func (*Session) Encode

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

Encode implements json.Marshaler.

func (*Session) GetExpires

func (s *Session) GetExpires() time.Time

GetExpires returns the value of Expires.

func (*Session) GetHash

func (s *Session) GetHash() string

GetHash returns the value of Hash.

func (*Session) GetIsPremium

func (s *Session) GetIsPremium() bool

GetIsPremium returns the value of IsPremium.

func (*Session) GetName

func (s *Session) GetName() string

GetName returns the value of Name.

func (*Session) GetUserId

func (s *Session) GetUserId() int64

GetUserId returns the value of UserId.

func (*Session) GetUserName

func (s *Session) GetUserName() string

GetUserName returns the value of UserName.

func (*Session) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Session) SetExpires

func (s *Session) SetExpires(val time.Time)

SetExpires sets the value of Expires.

func (*Session) SetHash

func (s *Session) SetHash(val string)

SetHash sets the value of Hash.

func (*Session) SetIsPremium

func (s *Session) SetIsPremium(val bool)

SetIsPremium sets the value of IsPremium.

func (*Session) SetName

func (s *Session) SetName(val string)

SetName sets the value of Name.

func (*Session) SetUserId

func (s *Session) SetUserId(val int64)

SetUserId sets the value of UserId.

func (*Session) SetUserName

func (s *Session) SetUserName(val string)

SetUserName sets the value of UserName.

func (*Session) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Session) Validate

func (s *Session) Validate() error

type SessionCreate

type SessionCreate struct {
	// User's display name or full name.
	Name string `json:"name"`
	// Telegram username without @ symbol.
	UserName string `json:"userName"`
	// Telegram user ID (unique identifier).
	UserId int64 `json:"userId"`
	// Premium subscription status.
	IsPremium bool `json:"isPremium"`
	// Session hash for verification and security.
	Hash string `json:"hash"`
	// Session expiration date.
	Expires time.Time `json:"expires"`
	// Optional session token for client identification.
	Session string `json:"session"`
}

User session information containing authentication and profile details. Ref: #/components/schemas/SessionCreate

func (*SessionCreate) Decode

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

Decode decodes SessionCreate from json.

func (*SessionCreate) Encode

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

Encode implements json.Marshaler.

func (*SessionCreate) GetExpires

func (s *SessionCreate) GetExpires() time.Time

GetExpires returns the value of Expires.

func (*SessionCreate) GetHash

func (s *SessionCreate) GetHash() string

GetHash returns the value of Hash.

func (*SessionCreate) GetIsPremium

func (s *SessionCreate) GetIsPremium() bool

GetIsPremium returns the value of IsPremium.

func (*SessionCreate) GetName

func (s *SessionCreate) GetName() string

GetName returns the value of Name.

func (*SessionCreate) GetSession

func (s *SessionCreate) GetSession() string

GetSession returns the value of Session.

func (*SessionCreate) GetUserId

func (s *SessionCreate) GetUserId() int64

GetUserId returns the value of UserId.

func (*SessionCreate) GetUserName

func (s *SessionCreate) GetUserName() string

GetUserName returns the value of UserName.

func (*SessionCreate) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*SessionCreate) SetExpires

func (s *SessionCreate) SetExpires(val time.Time)

SetExpires sets the value of Expires.

func (*SessionCreate) SetHash

func (s *SessionCreate) SetHash(val string)

SetHash sets the value of Hash.

func (*SessionCreate) SetIsPremium

func (s *SessionCreate) SetIsPremium(val bool)

SetIsPremium sets the value of IsPremium.

func (*SessionCreate) SetName

func (s *SessionCreate) SetName(val string)

SetName sets the value of Name.

func (*SessionCreate) SetSession

func (s *SessionCreate) SetSession(val string)

SetSession sets the value of Session.

func (*SessionCreate) SetUserId

func (s *SessionCreate) SetUserId(val int64)

SetUserId sets the value of UserId.

func (*SessionCreate) SetUserName

func (s *SessionCreate) SetUserName(val string)

SetUserName sets the value of UserName.

func (*SessionCreate) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SessionCreate) Validate

func (s *SessionCreate) Validate() error

type SessionHeaders

type SessionHeaders struct {
	SetCookie string
	Response  Session
}

SessionHeaders wraps Session with response headers.

func (*SessionHeaders) GetResponse

func (s *SessionHeaders) GetResponse() Session

GetResponse returns the value of Response.

func (*SessionHeaders) GetSetCookie

func (s *SessionHeaders) GetSetCookie() string

GetSetCookie returns the value of SetCookie.

func (*SessionHeaders) SetResponse

func (s *SessionHeaders) SetResponse(val Session)

SetResponse sets the value of Response.

func (*SessionHeaders) SetSetCookie

func (s *SessionHeaders) SetSetCookie(val string)

SetSetCookie sets the value of SetCookie.

func (*SessionHeaders) Validate

func (s *SessionHeaders) Validate() error

type ShareQueryOrder

type ShareQueryOrder string
const (
	ShareQueryOrderAsc  ShareQueryOrder = "asc"
	ShareQueryOrderDesc ShareQueryOrder = "desc"
)

func (ShareQueryOrder) AllValues

func (ShareQueryOrder) AllValues() []ShareQueryOrder

AllValues returns all ShareQueryOrder values.

func (ShareQueryOrder) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*ShareQueryOrder) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (ShareQueryOrder) Validate

func (s ShareQueryOrder) Validate() error

type ShareQuerySort

type ShareQuerySort string
const (
	ShareQuerySortName      ShareQuerySort = "name"
	ShareQuerySortUpdatedAt ShareQuerySort = "updatedAt"
	ShareQuerySortSize      ShareQuerySort = "size"
	ShareQuerySortID        ShareQuerySort = "id"
)

func (ShareQuerySort) AllValues

func (ShareQuerySort) AllValues() []ShareQuerySort

AllValues returns all ShareQuerySort values.

func (ShareQuerySort) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*ShareQuerySort) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (ShareQuerySort) Validate

func (s ShareQuerySort) Validate() error

type ShareUnlock

type ShareUnlock struct {
	// Share password.
	Password string `json:"password"`
}

Ref: #/components/schemas/ShareUnlock

func (*ShareUnlock) Decode

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

Decode decodes ShareUnlock from json.

func (*ShareUnlock) Encode

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

Encode implements json.Marshaler.

func (*ShareUnlock) GetPassword

func (s *ShareUnlock) GetPassword() string

GetPassword returns the value of Password.

func (*ShareUnlock) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*ShareUnlock) SetPassword

func (s *ShareUnlock) SetPassword(val string)

SetPassword sets the value of Password.

func (*ShareUnlock) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type SharesGetByIdParams

type SharesGetByIdParams struct {
	ID string
}

SharesGetByIdParams is parameters of Shares_getById operation.

type SharesListFilesParams

type SharesListFilesParams struct {
	ID string
	// Folder path.
	Path OptString
	// Sort field.
	Sort OptShareQuerySort
	// Sort order.
	Order OptShareQueryOrder
	// Items per page.
	Limit OptInt
	// Page number.
	Page OptInt
}

SharesListFilesParams is parameters of Shares_listFiles operation.

type SharesStreamDownload

type SharesStreamDownload string
const (
	SharesStreamDownload0 SharesStreamDownload = "0"
	SharesStreamDownload1 SharesStreamDownload = "1"
)

func (SharesStreamDownload) AllValues

AllValues returns all SharesStreamDownload values.

func (SharesStreamDownload) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*SharesStreamDownload) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (SharesStreamDownload) Validate

func (s SharesStreamDownload) Validate() error

type SharesStreamOK

type SharesStreamOK struct {
	Data io.Reader
}

func (SharesStreamOK) Read

func (s SharesStreamOK) Read(p []byte) (n int, err error)

Read reads data from the Data reader.

Kept to satisfy the io.Reader interface.

type SharesStreamOKAcceptRanges

type SharesStreamOKAcceptRanges string
const (
	SharesStreamOKAcceptRangesBytes SharesStreamOKAcceptRanges = "bytes"
)

func (SharesStreamOKAcceptRanges) AllValues

AllValues returns all SharesStreamOKAcceptRanges values.

func (SharesStreamOKAcceptRanges) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*SharesStreamOKAcceptRanges) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (SharesStreamOKAcceptRanges) Validate

func (s SharesStreamOKAcceptRanges) Validate() error

type SharesStreamOKHeaders

type SharesStreamOKHeaders struct {
	AcceptRanges       SharesStreamOKAcceptRanges
	ContentDisposition string
	ContentLength      string
	ContentRange       OptString
	ContentType        string
	Etag               string
	LastModified       string
	Response           SharesStreamOK
}

SharesStreamOKHeaders wraps SharesStreamOK with response headers.

func (*SharesStreamOKHeaders) GetAcceptRanges

GetAcceptRanges returns the value of AcceptRanges.

func (*SharesStreamOKHeaders) GetContentDisposition

func (s *SharesStreamOKHeaders) GetContentDisposition() string

GetContentDisposition returns the value of ContentDisposition.

func (*SharesStreamOKHeaders) GetContentLength

func (s *SharesStreamOKHeaders) GetContentLength() string

GetContentLength returns the value of ContentLength.

func (*SharesStreamOKHeaders) GetContentRange

func (s *SharesStreamOKHeaders) GetContentRange() OptString

GetContentRange returns the value of ContentRange.

func (*SharesStreamOKHeaders) GetContentType

func (s *SharesStreamOKHeaders) GetContentType() string

GetContentType returns the value of ContentType.

func (*SharesStreamOKHeaders) GetEtag

func (s *SharesStreamOKHeaders) GetEtag() string

GetEtag returns the value of Etag.

func (*SharesStreamOKHeaders) GetLastModified

func (s *SharesStreamOKHeaders) GetLastModified() string

GetLastModified returns the value of LastModified.

func (*SharesStreamOKHeaders) GetResponse

func (s *SharesStreamOKHeaders) GetResponse() SharesStreamOK

GetResponse returns the value of Response.

func (*SharesStreamOKHeaders) SetAcceptRanges

func (s *SharesStreamOKHeaders) SetAcceptRanges(val SharesStreamOKAcceptRanges)

SetAcceptRanges sets the value of AcceptRanges.

func (*SharesStreamOKHeaders) SetContentDisposition

func (s *SharesStreamOKHeaders) SetContentDisposition(val string)

SetContentDisposition sets the value of ContentDisposition.

func (*SharesStreamOKHeaders) SetContentLength

func (s *SharesStreamOKHeaders) SetContentLength(val string)

SetContentLength sets the value of ContentLength.

func (*SharesStreamOKHeaders) SetContentRange

func (s *SharesStreamOKHeaders) SetContentRange(val OptString)

SetContentRange sets the value of ContentRange.

func (*SharesStreamOKHeaders) SetContentType

func (s *SharesStreamOKHeaders) SetContentType(val string)

SetContentType sets the value of ContentType.

func (*SharesStreamOKHeaders) SetEtag

func (s *SharesStreamOKHeaders) SetEtag(val string)

SetEtag sets the value of Etag.

func (*SharesStreamOKHeaders) SetLastModified

func (s *SharesStreamOKHeaders) SetLastModified(val string)

SetLastModified sets the value of LastModified.

func (*SharesStreamOKHeaders) SetResponse

func (s *SharesStreamOKHeaders) SetResponse(val SharesStreamOK)

SetResponse sets the value of Response.

func (*SharesStreamOKHeaders) Validate

func (s *SharesStreamOKHeaders) Validate() error

type SharesStreamParams

type SharesStreamParams struct {
	ID       string
	Name     string
	FileId   string
	Download OptSharesStreamDownload
}

SharesStreamParams is parameters of Shares_stream operation.

type SharesStreamPartialContent

type SharesStreamPartialContent struct {
	Data io.Reader
}

func (SharesStreamPartialContent) Read

func (s SharesStreamPartialContent) Read(p []byte) (n int, err error)

Read reads data from the Data reader.

Kept to satisfy the io.Reader interface.

type SharesStreamPartialContentAcceptRanges

type SharesStreamPartialContentAcceptRanges string
const (
	SharesStreamPartialContentAcceptRangesBytes SharesStreamPartialContentAcceptRanges = "bytes"
)

func (SharesStreamPartialContentAcceptRanges) AllValues

AllValues returns all SharesStreamPartialContentAcceptRanges values.

func (SharesStreamPartialContentAcceptRanges) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*SharesStreamPartialContentAcceptRanges) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (SharesStreamPartialContentAcceptRanges) Validate

type SharesStreamPartialContentHeaders

type SharesStreamPartialContentHeaders struct {
	AcceptRanges       SharesStreamPartialContentAcceptRanges
	ContentDisposition string
	ContentLength      string
	ContentRange       OptString
	ContentType        string
	Etag               string
	LastModified       string
	Response           SharesStreamPartialContent
}

SharesStreamPartialContentHeaders wraps SharesStreamPartialContent with response headers.

func (*SharesStreamPartialContentHeaders) GetAcceptRanges

GetAcceptRanges returns the value of AcceptRanges.

func (*SharesStreamPartialContentHeaders) GetContentDisposition

func (s *SharesStreamPartialContentHeaders) GetContentDisposition() string

GetContentDisposition returns the value of ContentDisposition.

func (*SharesStreamPartialContentHeaders) GetContentLength

func (s *SharesStreamPartialContentHeaders) GetContentLength() string

GetContentLength returns the value of ContentLength.

func (*SharesStreamPartialContentHeaders) GetContentRange

func (s *SharesStreamPartialContentHeaders) GetContentRange() OptString

GetContentRange returns the value of ContentRange.

func (*SharesStreamPartialContentHeaders) GetContentType

func (s *SharesStreamPartialContentHeaders) GetContentType() string

GetContentType returns the value of ContentType.

func (*SharesStreamPartialContentHeaders) GetEtag

GetEtag returns the value of Etag.

func (*SharesStreamPartialContentHeaders) GetLastModified

func (s *SharesStreamPartialContentHeaders) GetLastModified() string

GetLastModified returns the value of LastModified.

func (*SharesStreamPartialContentHeaders) GetResponse

GetResponse returns the value of Response.

func (*SharesStreamPartialContentHeaders) SetAcceptRanges

SetAcceptRanges sets the value of AcceptRanges.

func (*SharesStreamPartialContentHeaders) SetContentDisposition

func (s *SharesStreamPartialContentHeaders) SetContentDisposition(val string)

SetContentDisposition sets the value of ContentDisposition.

func (*SharesStreamPartialContentHeaders) SetContentLength

func (s *SharesStreamPartialContentHeaders) SetContentLength(val string)

SetContentLength sets the value of ContentLength.

func (*SharesStreamPartialContentHeaders) SetContentRange

func (s *SharesStreamPartialContentHeaders) SetContentRange(val OptString)

SetContentRange sets the value of ContentRange.

func (*SharesStreamPartialContentHeaders) SetContentType

func (s *SharesStreamPartialContentHeaders) SetContentType(val string)

SetContentType sets the value of ContentType.

func (*SharesStreamPartialContentHeaders) SetEtag

func (s *SharesStreamPartialContentHeaders) SetEtag(val string)

SetEtag sets the value of Etag.

func (*SharesStreamPartialContentHeaders) SetLastModified

func (s *SharesStreamPartialContentHeaders) SetLastModified(val string)

SetLastModified sets the value of LastModified.

func (*SharesStreamPartialContentHeaders) SetResponse

SetResponse sets the value of Response.

func (*SharesStreamPartialContentHeaders) Validate

type SharesStreamRes

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

type SharesUnlockNoContent

type SharesUnlockNoContent struct{}

SharesUnlockNoContent is response for SharesUnlock operation.

type SharesUnlockParams

type SharesUnlockParams struct {
	ID string
}

SharesUnlockParams is parameters of Shares_unlock operation.

type UploadPart

type UploadPart struct {
	// Name identifier of the part.
	Name string `json:"name"`
	// Telegram Message ID.
	PartId int `json:"partId"`
	// Sequential number of the part.
	PartNo int `json:"partNo"`
	// Channel identifier associated with the upload.
	ChannelId int64 `json:"channelId"`
	// Size of the part in bytes.
	Size int64 `json:"size"`
	// Indicates if the part is encrypted.
	Encrypted bool `json:"encrypted"`
	// Salt value used for encryption, required if encrypted is true.
	Salt OptString `json:"salt"`
}

Details of an uploaded part. Ref: #/components/schemas/UploadPart

func (*UploadPart) Decode

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

Decode decodes UploadPart from json.

func (*UploadPart) Encode

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

Encode implements json.Marshaler.

func (*UploadPart) GetChannelId

func (s *UploadPart) GetChannelId() int64

GetChannelId returns the value of ChannelId.

func (*UploadPart) GetEncrypted

func (s *UploadPart) GetEncrypted() bool

GetEncrypted returns the value of Encrypted.

func (*UploadPart) GetName

func (s *UploadPart) GetName() string

GetName returns the value of Name.

func (*UploadPart) GetPartId

func (s *UploadPart) GetPartId() int

GetPartId returns the value of PartId.

func (*UploadPart) GetPartNo

func (s *UploadPart) GetPartNo() int

GetPartNo returns the value of PartNo.

func (*UploadPart) GetSalt

func (s *UploadPart) GetSalt() OptString

GetSalt returns the value of Salt.

func (*UploadPart) GetSize

func (s *UploadPart) GetSize() int64

GetSize returns the value of Size.

func (*UploadPart) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*UploadPart) SetChannelId

func (s *UploadPart) SetChannelId(val int64)

SetChannelId sets the value of ChannelId.

func (*UploadPart) SetEncrypted

func (s *UploadPart) SetEncrypted(val bool)

SetEncrypted sets the value of Encrypted.

func (*UploadPart) SetName

func (s *UploadPart) SetName(val string)

SetName sets the value of Name.

func (*UploadPart) SetPartId

func (s *UploadPart) SetPartId(val int)

SetPartId sets the value of PartId.

func (*UploadPart) SetPartNo

func (s *UploadPart) SetPartNo(val int)

SetPartNo sets the value of PartNo.

func (*UploadPart) SetSalt

func (s *UploadPart) SetSalt(val OptString)

SetSalt sets the value of Salt.

func (*UploadPart) SetSize

func (s *UploadPart) SetSize(val int64)

SetSize sets the value of Size.

func (*UploadPart) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type UploadStats

type UploadStats struct {
	// Date and time when the upload occurred.
	UploadDate time.Time `json:"uploadDate"`
	// Total number of bytes uploaded.
	TotalUploaded int64 `json:"totalUploaded"`
}

Statistics about the upload. Ref: #/components/schemas/UploadStats

func (*UploadStats) Decode

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

Decode decodes UploadStats from json.

func (*UploadStats) Encode

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

Encode implements json.Marshaler.

func (*UploadStats) GetTotalUploaded

func (s *UploadStats) GetTotalUploaded() int64

GetTotalUploaded returns the value of TotalUploaded.

func (*UploadStats) GetUploadDate

func (s *UploadStats) GetUploadDate() time.Time

GetUploadDate returns the value of UploadDate.

func (*UploadStats) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*UploadStats) SetTotalUploaded

func (s *UploadStats) SetTotalUploaded(val int64)

SetTotalUploaded sets the value of TotalUploaded.

func (*UploadStats) SetUploadDate

func (s *UploadStats) SetUploadDate(val time.Time)

SetUploadDate sets the value of UploadDate.

func (*UploadStats) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type UploadsDeleteNoContent

type UploadsDeleteNoContent struct{}

UploadsDeleteNoContent is response for UploadsDelete operation.

type UploadsDeleteParams

type UploadsDeleteParams struct {
	ID string
}

UploadsDeleteParams is parameters of Uploads_delete operation.

type UploadsPartsByIdParams

type UploadsPartsByIdParams struct {
	ID string
}

UploadsPartsByIdParams is parameters of Uploads_partsById operation.

type UploadsStatsParams

type UploadsStatsParams struct {
	Days int
}

UploadsStatsParams is parameters of Uploads_stats operation.

type UploadsUploadParams

type UploadsUploadParams struct {
	ID            string
	ContentLength int64
	// Name of the part being uploaded.
	PartName string
	// Original file name.
	FileName string
	// Part number in sequence.
	PartNo int
	// Optional channel identifier for upload.
	ChannelId OptInt64
	// Whether the upload content is encrypted.
	Encrypted OptBool
}

UploadsUploadParams is parameters of Uploads_upload operation.

type UploadsUploadReq

type UploadsUploadReq struct {
	Data io.Reader
}

func (UploadsUploadReq) Read

func (s UploadsUploadReq) Read(p []byte) (n int, err error)

Read reads data from the Data reader.

Kept to satisfy the io.Reader interface.

type UploadsUploadReqWithContentType

type UploadsUploadReqWithContentType struct {
	ContentType string
	Content     UploadsUploadReq
}

UploadsUploadReqWithContentType wraps UploadsUploadReq with Content-Type.

func (*UploadsUploadReqWithContentType) GetContent

GetContent returns the value of Content.

func (*UploadsUploadReqWithContentType) GetContentType

func (s *UploadsUploadReqWithContentType) GetContentType() string

GetContentType returns the value of ContentType.

func (*UploadsUploadReqWithContentType) SetContent

SetContent sets the value of Content.

func (*UploadsUploadReqWithContentType) SetContentType

func (s *UploadsUploadReqWithContentType) SetContentType(val string)

SetContentType sets the value of ContentType.

type UserConfig

type UserConfig struct {
	// Channel identifier associated with the user.
	ChannelId int64 `json:"channelId"`
	// List of bot tokens.
	Bots []string `json:"bots"`
}

User configuration for channel and bot settings. Ref: #/components/schemas/UserConfig

func (*UserConfig) Decode

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

Decode decodes UserConfig from json.

func (*UserConfig) Encode

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

Encode implements json.Marshaler.

func (*UserConfig) GetBots

func (s *UserConfig) GetBots() []string

GetBots returns the value of Bots.

func (*UserConfig) GetChannelId

func (s *UserConfig) GetChannelId() int64

GetChannelId returns the value of ChannelId.

func (*UserConfig) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*UserConfig) SetBots

func (s *UserConfig) SetBots(val []string)

SetBots sets the value of Bots.

func (*UserConfig) SetChannelId

func (s *UserConfig) SetChannelId(val int64)

SetChannelId sets the value of ChannelId.

func (*UserConfig) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*UserConfig) Validate

func (s *UserConfig) Validate() error

type UserSession

type UserSession struct {
	// Unique hash identifier for the session.
	Hash string `json:"hash"`
	// Session creation timestamp.
	CreatedAt time.Time `json:"createdAt"`
	// Geographic location where session was created.
	Location OptString `json:"location"`
	// Indicates if session is from an official Telegram app.
	OfficialApp OptBool `json:"officialApp"`
	// Name of the application used for session.
	AppName OptString `json:"appName"`
	// Indicates if the session is still valid.
	Valid bool `json:"valid"`
	// Indicates if this is the currently active session.
	Current bool `json:"current"`
}

User session information. Ref: #/components/schemas/UserSession

func (*UserSession) Decode

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

Decode decodes UserSession from json.

func (*UserSession) Encode

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

Encode implements json.Marshaler.

func (*UserSession) GetAppName

func (s *UserSession) GetAppName() OptString

GetAppName returns the value of AppName.

func (*UserSession) GetCreatedAt

func (s *UserSession) GetCreatedAt() time.Time

GetCreatedAt returns the value of CreatedAt.

func (*UserSession) GetCurrent

func (s *UserSession) GetCurrent() bool

GetCurrent returns the value of Current.

func (*UserSession) GetHash

func (s *UserSession) GetHash() string

GetHash returns the value of Hash.

func (*UserSession) GetLocation

func (s *UserSession) GetLocation() OptString

GetLocation returns the value of Location.

func (*UserSession) GetOfficialApp

func (s *UserSession) GetOfficialApp() OptBool

GetOfficialApp returns the value of OfficialApp.

func (*UserSession) GetValid

func (s *UserSession) GetValid() bool

GetValid returns the value of Valid.

func (*UserSession) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*UserSession) SetAppName

func (s *UserSession) SetAppName(val OptString)

SetAppName sets the value of AppName.

func (*UserSession) SetCreatedAt

func (s *UserSession) SetCreatedAt(val time.Time)

SetCreatedAt sets the value of CreatedAt.

func (*UserSession) SetCurrent

func (s *UserSession) SetCurrent(val bool)

SetCurrent sets the value of Current.

func (*UserSession) SetHash

func (s *UserSession) SetHash(val string)

SetHash sets the value of Hash.

func (*UserSession) SetLocation

func (s *UserSession) SetLocation(val OptString)

SetLocation sets the value of Location.

func (*UserSession) SetOfficialApp

func (s *UserSession) SetOfficialApp(val OptBool)

SetOfficialApp sets the value of OfficialApp.

func (*UserSession) SetValid

func (s *UserSession) SetValid(val bool)

SetValid sets the value of Valid.

func (*UserSession) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type UsersAddBotsNoContent

type UsersAddBotsNoContent struct{}

UsersAddBotsNoContent is response for UsersAddBots operation.

type UsersProfileImageOK

type UsersProfileImageOK struct {
	Data io.Reader
}

func (UsersProfileImageOK) Read

func (s UsersProfileImageOK) Read(p []byte) (n int, err error)

Read reads data from the Data reader.

Kept to satisfy the io.Reader interface.

type UsersProfileImageOKHeaders

type UsersProfileImageOKHeaders struct {
	CacheControl       string
	ContentDisposition string
	ContentLength      int64
	Etag               string
	Response           UsersProfileImageOK
}

UsersProfileImageOKHeaders wraps UsersProfileImageOK with response headers.

func (*UsersProfileImageOKHeaders) GetCacheControl

func (s *UsersProfileImageOKHeaders) GetCacheControl() string

GetCacheControl returns the value of CacheControl.

func (*UsersProfileImageOKHeaders) GetContentDisposition

func (s *UsersProfileImageOKHeaders) GetContentDisposition() string

GetContentDisposition returns the value of ContentDisposition.

func (*UsersProfileImageOKHeaders) GetContentLength

func (s *UsersProfileImageOKHeaders) GetContentLength() int64

GetContentLength returns the value of ContentLength.

func (*UsersProfileImageOKHeaders) GetEtag

func (s *UsersProfileImageOKHeaders) GetEtag() string

GetEtag returns the value of Etag.

func (*UsersProfileImageOKHeaders) GetResponse

GetResponse returns the value of Response.

func (*UsersProfileImageOKHeaders) SetCacheControl

func (s *UsersProfileImageOKHeaders) SetCacheControl(val string)

SetCacheControl sets the value of CacheControl.

func (*UsersProfileImageOKHeaders) SetContentDisposition

func (s *UsersProfileImageOKHeaders) SetContentDisposition(val string)

SetContentDisposition sets the value of ContentDisposition.

func (*UsersProfileImageOKHeaders) SetContentLength

func (s *UsersProfileImageOKHeaders) SetContentLength(val int64)

SetContentLength sets the value of ContentLength.

func (*UsersProfileImageOKHeaders) SetEtag

func (s *UsersProfileImageOKHeaders) SetEtag(val string)

SetEtag sets the value of Etag.

func (*UsersProfileImageOKHeaders) SetResponse

func (s *UsersProfileImageOKHeaders) SetResponse(val UsersProfileImageOK)

SetResponse sets the value of Response.

type UsersProfileImageParams

type UsersProfileImageParams struct {
	Name string
}

UsersProfileImageParams is parameters of Users_profileImage operation.

type UsersRemoveBotsNoContent

type UsersRemoveBotsNoContent struct{}

UsersRemoveBotsNoContent is response for UsersRemoveBots operation.

type UsersRemoveSessionNoContent

type UsersRemoveSessionNoContent struct{}

UsersRemoveSessionNoContent is response for UsersRemoveSession operation.

type UsersRemoveSessionParams

type UsersRemoveSessionParams struct {
	ID string
}

UsersRemoveSessionParams is parameters of Users_removeSession operation.

type UsersSyncChannelsNoContent

type UsersSyncChannelsNoContent struct{}

UsersSyncChannelsNoContent is response for UsersSyncChannels operation.

type UsersUpdateChannelNoContent

type UsersUpdateChannelNoContent struct{}

UsersUpdateChannelNoContent is response for UsersUpdateChannel operation.

Jump to

Keyboard shortcuts

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