apiv1specs

package
v0.0.1-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package apiv1specs provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.9.0 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "bearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func NewGetColIdAudioPathRequest

func NewGetColIdAudioPathRequest(server string, colId CollectionId, path Path, params *GetColIdAudioPathParams) (*http.Request, error)

NewGetColIdAudioPathRequest generates requests for GetColIdAudioPath

func NewGetColIdCoverPathRequest

func NewGetColIdCoverPathRequest(server string, colId CollectionId, path Path) (*http.Request, error)

NewGetColIdCoverPathRequest generates requests for GetColIdCoverPath

func NewGetColIdDescPathRequest

func NewGetColIdDescPathRequest(server string, colId CollectionId, path Path) (*http.Request, error)

NewGetColIdDescPathRequest generates requests for GetColIdDescPath

func NewGetColIdDownloadPathRequest

func NewGetColIdDownloadPathRequest(server string, colId CollectionId, path Path, params *GetColIdDownloadPathParams) (*http.Request, error)

NewGetColIdDownloadPathRequest generates requests for GetColIdDownloadPath

func NewGetColIdFolderPathRequest

func NewGetColIdFolderPathRequest(server string, colId CollectionId, path Path, params *GetColIdFolderPathParams) (*http.Request, error)

NewGetColIdFolderPathRequest generates requests for GetColIdFolderPath

func NewGetColIdFolderRequest

func NewGetColIdFolderRequest(server string, colId CollectionId, params *GetColIdFolderParams) (*http.Request, error)

NewGetColIdFolderRequest generates requests for GetColIdFolder

func NewGetColIdRecentRequest

func NewGetColIdRecentRequest(server string, colId CollectionId) (*http.Request, error)

NewGetColIdRecentRequest generates requests for GetColIdRecent

func NewGetColIdSearchRequest

func NewGetColIdSearchRequest(server string, colId CollectionId, params *GetColIdSearchParams) (*http.Request, error)

NewGetColIdSearchRequest generates requests for GetColIdSearch

func NewGetCollectionsRequest

func NewGetCollectionsRequest(server string) (*http.Request, error)

NewGetCollectionsRequest generates requests for GetCollections

func NewGetPositionsGroupColIdPathRequest

func NewGetPositionsGroupColIdPathRequest(server string, group GroupInPath, colId CollectionId, path Path, params *GetPositionsGroupColIdPathParams) (*http.Request, error)

NewGetPositionsGroupColIdPathRequest generates requests for GetPositionsGroupColIdPath

func NewGetPositionsGroupLastRequest

func NewGetPositionsGroupLastRequest(server string, group GroupInPath) (*http.Request, error)

NewGetPositionsGroupLastRequest generates requests for GetPositionsGroupLast

func NewGetPositionsGroupRequest

func NewGetPositionsGroupRequest(server string, group GroupInPath, params *GetPositionsGroupParams) (*http.Request, error)

NewGetPositionsGroupRequest generates requests for GetPositionsGroup

func NewGetTranscodingsRequest

func NewGetTranscodingsRequest(server string) (*http.Request, error)

NewGetTranscodingsRequest generates requests for GetTranscodings

func NewPostAuthenticateRequest

func NewPostAuthenticateRequest(server string, body PostAuthenticateJSONRequestBody) (*http.Request, error)

NewPostAuthenticateRequest calls the generic PostAuthenticate builder with application/json body

func NewPostAuthenticateRequestWithBody

func NewPostAuthenticateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostAuthenticateRequestWithBody generates requests for PostAuthenticate with any type of body

func NewPostPositionsGroupRequest

func NewPostPositionsGroupRequest(server string, group GroupInPath, body PostPositionsGroupJSONRequestBody) (*http.Request, error)

NewPostPositionsGroupRequest calls the generic PostPositionsGroup builder with application/json body

func NewPostPositionsGroupRequestWithBody

func NewPostPositionsGroupRequestWithBody(server string, group GroupInPath, contentType string, body io.Reader) (*http.Request, error)

NewPostPositionsGroupRequestWithBody generates requests for PostPositionsGroup with any type of body

Types

type AudioFile

type AudioFile struct {
	Meta *struct {
		// Encoding bitrate of file - original, before transcoding
		Bitrate *int `json:"bitrate,omitempty"`

		// Duration of audio file in seconds
		Duration *int `json:"duration,omitempty"`

		// Metadata tags as map of name to value
		Tags *map[string]interface{} `json:"tags"`
	} `json:"meta"`

	// Mime type of audio file (before transcoding)
	Mime string `json:"mime"`
	Name string `json:"name"`
	Path string `json:"path"`

	// For chapter chunk out from big chaptered file (like .m4b)
	// this is start and duration (in milliseconds) of chapter with the that file
	Section *struct {
		// Duration of chapter in ms
		Duration *int `json:"duration,omitempty"`

		// Start of chapter in ms
		Start *int `json:"start,omitempty"`
	} `json:"section"`
}

AudioFile defines model for AudioFile.

type AudioFolder

type AudioFolder struct {
	Cover       *TypedFile   `json:"cover"`
	Description *TypedFile   `json:"description"`
	Files       *[]AudioFile `json:"files,omitempty"`

	// Is virtual folder - e.g. representing big chapterized file (.m4b etc.)
	IsFile *bool `json:"is_file,omitempty"`

	// last modification timestamp (unix time in miliseconds)
	Modified   *float32     `json:"modified,omitempty"`
	Subfolders *[]Subfolder `json:"subfolders,omitempty"`

	// Metadata tags for this folders - map of name to value
	Tags *map[string]interface{} `json:"tags"`

	// Total playback time of the audiofolder in seconds
	TotalTime *int `json:"total_time,omitempty"`
}

AudioFolder defines model for AudioFolder.

type AudioResponse

type AudioResponse struct {
	Data        []byte
	Transcoding []string
}

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) GetColIdAudioPath

func (c *Client) GetColIdAudioPath(ctx context.Context, colId CollectionId, path Path, params *GetColIdAudioPathParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetColIdCoverPath

func (c *Client) GetColIdCoverPath(ctx context.Context, colId CollectionId, path Path, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetColIdDescPath

func (c *Client) GetColIdDescPath(ctx context.Context, colId CollectionId, path Path, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetColIdDownloadPath

func (c *Client) GetColIdDownloadPath(ctx context.Context, colId CollectionId, path Path, params *GetColIdDownloadPathParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetColIdFolder

func (c *Client) GetColIdFolder(ctx context.Context, colId CollectionId, params *GetColIdFolderParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetColIdFolderPath

func (c *Client) GetColIdFolderPath(ctx context.Context, colId CollectionId, path Path, params *GetColIdFolderPathParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetColIdRecent

func (c *Client) GetColIdRecent(ctx context.Context, colId CollectionId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetColIdSearch

func (c *Client) GetColIdSearch(ctx context.Context, colId CollectionId, params *GetColIdSearchParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCollections

func (c *Client) GetCollections(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPositionsGroup

func (c *Client) GetPositionsGroup(ctx context.Context, group GroupInPath, params *GetPositionsGroupParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPositionsGroupColIdPath

func (c *Client) GetPositionsGroupColIdPath(ctx context.Context, group GroupInPath, colId CollectionId, path Path, params *GetPositionsGroupColIdPathParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPositionsGroupLast

func (c *Client) GetPositionsGroupLast(ctx context.Context, group GroupInPath, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetToken

func (c *Client) GetToken(ctx context.Context, sharedSecret string) (*string, error)

func (*Client) GetTranscodings

func (c *Client) GetTranscodings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostAuthenticate

func (c *Client) PostAuthenticate(ctx context.Context, body PostAuthenticateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostAuthenticateWithBody

func (c *Client) PostAuthenticateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostPositionsGroup

func (c *Client) PostPositionsGroup(ctx context.Context, group GroupInPath, body PostPositionsGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostPositionsGroupWithBody

func (c *Client) PostPositionsGroupWithBody(ctx context.Context, group GroupInPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SaltPassword

func (c *Client) SaltPassword(password string) string

type ClientInterface

type ClientInterface interface {
	// PostAuthenticate request with any body
	PostAuthenticateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostAuthenticate(ctx context.Context, body PostAuthenticateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCollections request
	GetCollections(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPositionsGroup request
	GetPositionsGroup(ctx context.Context, group GroupInPath, params *GetPositionsGroupParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostPositionsGroup request with any body
	PostPositionsGroupWithBody(ctx context.Context, group GroupInPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostPositionsGroup(ctx context.Context, group GroupInPath, body PostPositionsGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPositionsGroupLast request
	GetPositionsGroupLast(ctx context.Context, group GroupInPath, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPositionsGroupColIdPath request
	GetPositionsGroupColIdPath(ctx context.Context, group GroupInPath, colId CollectionId, path Path, params *GetPositionsGroupColIdPathParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTranscodings request
	GetTranscodings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetColIdAudioPath request
	GetColIdAudioPath(ctx context.Context, colId CollectionId, path Path, params *GetColIdAudioPathParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetColIdCoverPath request
	GetColIdCoverPath(ctx context.Context, colId CollectionId, path Path, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetColIdDescPath request
	GetColIdDescPath(ctx context.Context, colId CollectionId, path Path, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetColIdDownloadPath request
	GetColIdDownloadPath(ctx context.Context, colId CollectionId, path Path, params *GetColIdDownloadPathParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetColIdFolder request
	GetColIdFolder(ctx context.Context, colId CollectionId, params *GetColIdFolderParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetColIdFolderPath request
	GetColIdFolderPath(ctx context.Context, colId CollectionId, path Path, params *GetColIdFolderPathParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetColIdRecent request
	GetColIdRecent(ctx context.Context, colId CollectionId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetColIdSearch request
	GetColIdSearch(ctx context.Context, colId CollectionId, params *GetColIdSearchParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) GetColIdAudioPathWithResponse

func (c *ClientWithResponses) GetColIdAudioPathWithResponse(ctx context.Context, colId CollectionId, path Path, params *GetColIdAudioPathParams, reqEditors ...RequestEditorFn) (*GetColIdAudioPathResponse, error)

GetColIdAudioPathWithResponse request returning *GetColIdAudioPathResponse

func (*ClientWithResponses) GetColIdCoverPathWithResponse

func (c *ClientWithResponses) GetColIdCoverPathWithResponse(ctx context.Context, colId CollectionId, path Path, reqEditors ...RequestEditorFn) (*GetColIdCoverPathResponse, error)

GetColIdCoverPathWithResponse request returning *GetColIdCoverPathResponse

func (*ClientWithResponses) GetColIdDescPathWithResponse

func (c *ClientWithResponses) GetColIdDescPathWithResponse(ctx context.Context, colId CollectionId, path Path, reqEditors ...RequestEditorFn) (*GetColIdDescPathResponse, error)

GetColIdDescPathWithResponse request returning *GetColIdDescPathResponse

func (*ClientWithResponses) GetColIdDownloadPathWithResponse

func (c *ClientWithResponses) GetColIdDownloadPathWithResponse(ctx context.Context, colId CollectionId, path Path, params *GetColIdDownloadPathParams, reqEditors ...RequestEditorFn) (*GetColIdDownloadPathResponse, error)

GetColIdDownloadPathWithResponse request returning *GetColIdDownloadPathResponse

func (*ClientWithResponses) GetColIdFolderPathWithResponse

func (c *ClientWithResponses) GetColIdFolderPathWithResponse(ctx context.Context, colId CollectionId, path Path, params *GetColIdFolderPathParams, reqEditors ...RequestEditorFn) (*GetColIdFolderPathResponse, error)

GetColIdFolderPathWithResponse request returning *GetColIdFolderPathResponse

func (*ClientWithResponses) GetColIdFolderWithResponse

func (c *ClientWithResponses) GetColIdFolderWithResponse(ctx context.Context, colId CollectionId, params *GetColIdFolderParams, reqEditors ...RequestEditorFn) (*GetColIdFolderResponse, error)

GetColIdFolderWithResponse request returning *GetColIdFolderResponse

func (*ClientWithResponses) GetColIdRecentWithResponse

func (c *ClientWithResponses) GetColIdRecentWithResponse(ctx context.Context, colId CollectionId, reqEditors ...RequestEditorFn) (*GetColIdRecentResponse, error)

GetColIdRecentWithResponse request returning *GetColIdRecentResponse

func (*ClientWithResponses) GetColIdSearchWithResponse

func (c *ClientWithResponses) GetColIdSearchWithResponse(ctx context.Context, colId CollectionId, params *GetColIdSearchParams, reqEditors ...RequestEditorFn) (*GetColIdSearchResponse, error)

GetColIdSearchWithResponse request returning *GetColIdSearchResponse

func (*ClientWithResponses) GetCollectionsWithResponse

func (c *ClientWithResponses) GetCollectionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCollectionsResponse, error)

GetCollectionsWithResponse request returning *GetCollectionsResponse

func (*ClientWithResponses) GetPositionsGroupColIdPathWithResponse

func (c *ClientWithResponses) GetPositionsGroupColIdPathWithResponse(ctx context.Context, group GroupInPath, colId CollectionId, path Path, params *GetPositionsGroupColIdPathParams, reqEditors ...RequestEditorFn) (*GetPositionsGroupColIdPathResponse, error)

GetPositionsGroupColIdPathWithResponse request returning *GetPositionsGroupColIdPathResponse

func (*ClientWithResponses) GetPositionsGroupLastWithResponse

func (c *ClientWithResponses) GetPositionsGroupLastWithResponse(ctx context.Context, group GroupInPath, reqEditors ...RequestEditorFn) (*GetPositionsGroupLastResponse, error)

GetPositionsGroupLastWithResponse request returning *GetPositionsGroupLastResponse

func (*ClientWithResponses) GetPositionsGroupWithResponse

func (c *ClientWithResponses) GetPositionsGroupWithResponse(ctx context.Context, group GroupInPath, params *GetPositionsGroupParams, reqEditors ...RequestEditorFn) (*GetPositionsGroupResponse, error)

GetPositionsGroupWithResponse request returning *GetPositionsGroupResponse

func (*ClientWithResponses) GetTranscodingsWithResponse

func (c *ClientWithResponses) GetTranscodingsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTranscodingsResponse, error)

GetTranscodingsWithResponse request returning *GetTranscodingsResponse

func (*ClientWithResponses) PostAuthenticateWithBodyWithResponse

func (c *ClientWithResponses) PostAuthenticateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostAuthenticateResponse, error)

PostAuthenticateWithBodyWithResponse request with arbitrary body returning *PostAuthenticateResponse

func (*ClientWithResponses) PostAuthenticateWithResponse

func (c *ClientWithResponses) PostAuthenticateWithResponse(ctx context.Context, body PostAuthenticateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostAuthenticateResponse, error)

func (*ClientWithResponses) PostPositionsGroupWithBodyWithResponse

func (c *ClientWithResponses) PostPositionsGroupWithBodyWithResponse(ctx context.Context, group GroupInPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPositionsGroupResponse, error)

PostPositionsGroupWithBodyWithResponse request with arbitrary body returning *PostPositionsGroupResponse

func (*ClientWithResponses) PostPositionsGroupWithResponse

func (c *ClientWithResponses) PostPositionsGroupWithResponse(ctx context.Context, group GroupInPath, body PostPositionsGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPositionsGroupResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// PostAuthenticate request with any body
	PostAuthenticateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostAuthenticateResponse, error)

	PostAuthenticateWithResponse(ctx context.Context, body PostAuthenticateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostAuthenticateResponse, error)

	// GetCollections request
	GetCollectionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCollectionsResponse, error)

	// GetPositionsGroup request
	GetPositionsGroupWithResponse(ctx context.Context, group GroupInPath, params *GetPositionsGroupParams, reqEditors ...RequestEditorFn) (*GetPositionsGroupResponse, error)

	// PostPositionsGroup request with any body
	PostPositionsGroupWithBodyWithResponse(ctx context.Context, group GroupInPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPositionsGroupResponse, error)

	PostPositionsGroupWithResponse(ctx context.Context, group GroupInPath, body PostPositionsGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPositionsGroupResponse, error)

	// GetPositionsGroupLast request
	GetPositionsGroupLastWithResponse(ctx context.Context, group GroupInPath, reqEditors ...RequestEditorFn) (*GetPositionsGroupLastResponse, error)

	// GetPositionsGroupColIdPath request
	GetPositionsGroupColIdPathWithResponse(ctx context.Context, group GroupInPath, colId CollectionId, path Path, params *GetPositionsGroupColIdPathParams, reqEditors ...RequestEditorFn) (*GetPositionsGroupColIdPathResponse, error)

	// GetTranscodings request
	GetTranscodingsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTranscodingsResponse, error)

	// GetColIdAudioPath request
	GetColIdAudioPathWithResponse(ctx context.Context, colId CollectionId, path Path, params *GetColIdAudioPathParams, reqEditors ...RequestEditorFn) (*GetColIdAudioPathResponse, error)

	// GetColIdCoverPath request
	GetColIdCoverPathWithResponse(ctx context.Context, colId CollectionId, path Path, reqEditors ...RequestEditorFn) (*GetColIdCoverPathResponse, error)

	// GetColIdDescPath request
	GetColIdDescPathWithResponse(ctx context.Context, colId CollectionId, path Path, reqEditors ...RequestEditorFn) (*GetColIdDescPathResponse, error)

	// GetColIdDownloadPath request
	GetColIdDownloadPathWithResponse(ctx context.Context, colId CollectionId, path Path, params *GetColIdDownloadPathParams, reqEditors ...RequestEditorFn) (*GetColIdDownloadPathResponse, error)

	// GetColIdFolder request
	GetColIdFolderWithResponse(ctx context.Context, colId CollectionId, params *GetColIdFolderParams, reqEditors ...RequestEditorFn) (*GetColIdFolderResponse, error)

	// GetColIdFolderPath request
	GetColIdFolderPathWithResponse(ctx context.Context, colId CollectionId, path Path, params *GetColIdFolderPathParams, reqEditors ...RequestEditorFn) (*GetColIdFolderPathResponse, error)

	// GetColIdRecent request
	GetColIdRecentWithResponse(ctx context.Context, colId CollectionId, reqEditors ...RequestEditorFn) (*GetColIdRecentResponse, error)

	// GetColIdSearch request
	GetColIdSearchWithResponse(ctx context.Context, colId CollectionId, params *GetColIdSearchParams, reqEditors ...RequestEditorFn) (*GetColIdSearchResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CollectionId

type CollectionId int

CollectionId defines model for CollectionId.

type CollectionsInfo

type CollectionsInfo struct {
	// Size of names array
	Count *int `json:"count,omitempty"`

	// Is folder download endpoint enabled on server?
	FolderDownload *bool `json:"folder_download,omitempty"`

	// Names of available collections
	Names *[]string `json:"names,omitempty"`

	// Is playback position API enabled on server?
	SharedPositions *bool `json:"shared_positions,omitempty"`

	// Version of audioserve (and thus also version of API)
	Version *string `json:"version,omitempty"`
}

CollectionsInfo defines model for CollectionsInfo.

type Finished

type Finished bool

Finished defines model for Finished.

type From

type From int64

From defines model for From.

type GetColIdAudioPathParams

type GetColIdAudioPathParams struct {
	// Stars playback as <seek> seconds from beginning of file.
	// Beware overusing this parameter, as it can cause quite ineffective usage
	// of bandwidth and transcoding (which each seek like this part of file from
	// seek position is send again)
	Seek *float32 `json:"seek,omitempty"`

	// Required transcoding of the file **l**ow, **m**edium or **h**igh
	// as described by `/transcodings` endpoint response
	// If omitted or set to **0** no transcoding is done
	Trans *GetColIdAudioPathParamsTrans `json:"trans,omitempty"`

	// Optionally client can request range of bytes from file, will only work if
	// file is not actually transcoded.
	// Range is standard HTTP header as per [RFC 7233](https://datatracker.ietf.org/doc/html/rfc7233)
	Range *string `json:"range,omitempty"`
}

GetColIdAudioPathParams defines parameters for GetColIdAudioPath.

type GetColIdAudioPathParamsTrans

type GetColIdAudioPathParamsTrans string

GetColIdAudioPathParamsTrans defines parameters for GetColIdAudioPath.

type GetColIdAudioPathResponse

type GetColIdAudioPathResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseGetColIdAudioPathResponse

func ParseGetColIdAudioPathResponse(rsp *http.Response) (*GetColIdAudioPathResponse, error)

ParseGetColIdAudioPathResponse parses an HTTP response from a GetColIdAudioPathWithResponse call

func (GetColIdAudioPathResponse) Status

func (r GetColIdAudioPathResponse) Status() string

Status returns HTTPResponse.Status

func (GetColIdAudioPathResponse) StatusCode

func (r GetColIdAudioPathResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetColIdCoverPathResponse

type GetColIdCoverPathResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseGetColIdCoverPathResponse

func ParseGetColIdCoverPathResponse(rsp *http.Response) (*GetColIdCoverPathResponse, error)

ParseGetColIdCoverPathResponse parses an HTTP response from a GetColIdCoverPathWithResponse call

func (GetColIdCoverPathResponse) Status

func (r GetColIdCoverPathResponse) Status() string

Status returns HTTPResponse.Status

func (GetColIdCoverPathResponse) StatusCode

func (r GetColIdCoverPathResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetColIdDescPathResponse

type GetColIdDescPathResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseGetColIdDescPathResponse

func ParseGetColIdDescPathResponse(rsp *http.Response) (*GetColIdDescPathResponse, error)

ParseGetColIdDescPathResponse parses an HTTP response from a GetColIdDescPathWithResponse call

func (GetColIdDescPathResponse) Status

func (r GetColIdDescPathResponse) Status() string

Status returns HTTPResponse.Status

func (GetColIdDescPathResponse) StatusCode

func (r GetColIdDescPathResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetColIdDownloadPathParams

type GetColIdDownloadPathParams struct {
	// Archive format - zip(default) or tar
	Fmt *GetColIdDownloadPathParamsFmt `json:"fmt,omitempty"`
}

GetColIdDownloadPathParams defines parameters for GetColIdDownloadPath.

type GetColIdDownloadPathParamsFmt

type GetColIdDownloadPathParamsFmt string

GetColIdDownloadPathParamsFmt defines parameters for GetColIdDownloadPath.

type GetColIdDownloadPathResponse

type GetColIdDownloadPathResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseGetColIdDownloadPathResponse

func ParseGetColIdDownloadPathResponse(rsp *http.Response) (*GetColIdDownloadPathResponse, error)

ParseGetColIdDownloadPathResponse parses an HTTP response from a GetColIdDownloadPathWithResponse call

func (GetColIdDownloadPathResponse) Status

Status returns HTTPResponse.Status

func (GetColIdDownloadPathResponse) StatusCode

func (r GetColIdDownloadPathResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetColIdFolderParams

type GetColIdFolderParams struct {
	// ordering of subfolders, two values are now supported:
	// - `a` alphabetical (default if not present)
	// - `m` recent first (using folder mtime)
	Ord *GetColIdFolderParamsOrd `json:"ord,omitempty"`

	// Playback position sharing group.
	// If present last know position for the folder can be included in response
	Group *Group `json:"group,omitempty"`
}

GetColIdFolderParams defines parameters for GetColIdFolder.

type GetColIdFolderParamsOrd

type GetColIdFolderParamsOrd string

GetColIdFolderParamsOrd defines parameters for GetColIdFolder.

type GetColIdFolderPathParams

type GetColIdFolderPathParams struct {
	// ordering of subfolders, two values are now supported:
	// - `a` alphabetical (default if not present)
	// - `m` recent first (using folder mtime)
	Ord *GetColIdFolderPathParamsOrd `json:"ord,omitempty"`

	// Playback position sharing group.
	// If present last know position for the folder can be included in response
	Group *Group `json:"group,omitempty"`
}

GetColIdFolderPathParams defines parameters for GetColIdFolderPath.

type GetColIdFolderPathParamsOrd

type GetColIdFolderPathParamsOrd string

GetColIdFolderPathParamsOrd defines parameters for GetColIdFolderPath.

type GetColIdFolderPathResponse

type GetColIdFolderPathResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AudioFolder
}

func ParseGetColIdFolderPathResponse

func ParseGetColIdFolderPathResponse(rsp *http.Response) (*GetColIdFolderPathResponse, error)

ParseGetColIdFolderPathResponse parses an HTTP response from a GetColIdFolderPathWithResponse call

func (GetColIdFolderPathResponse) Status

Status returns HTTPResponse.Status

func (GetColIdFolderPathResponse) StatusCode

func (r GetColIdFolderPathResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetColIdFolderResponse

type GetColIdFolderResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AudioFolder
}

func ParseGetColIdFolderResponse

func ParseGetColIdFolderResponse(rsp *http.Response) (*GetColIdFolderResponse, error)

ParseGetColIdFolderResponse parses an HTTP response from a GetColIdFolderWithResponse call

func (GetColIdFolderResponse) Status

func (r GetColIdFolderResponse) Status() string

Status returns HTTPResponse.Status

func (GetColIdFolderResponse) StatusCode

func (r GetColIdFolderResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetColIdRecentResponse

type GetColIdRecentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SearchResult
}

func ParseGetColIdRecentResponse

func ParseGetColIdRecentResponse(rsp *http.Response) (*GetColIdRecentResponse, error)

ParseGetColIdRecentResponse parses an HTTP response from a GetColIdRecentWithResponse call

func (GetColIdRecentResponse) Status

func (r GetColIdRecentResponse) Status() string

Status returns HTTPResponse.Status

func (GetColIdRecentResponse) StatusCode

func (r GetColIdRecentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetColIdSearchParams

type GetColIdSearchParams struct {
	// ordering of subfolders, two values are now supported:
	// - `a` alphabetical (default if not present)
	// - `m` recent first (using folder mtime)
	Ord *GetColIdSearchParamsOrd `json:"ord,omitempty"`

	// Search terms (separated by space). Looks for all terms on folder path.
	Q string `json:"q"`
}

GetColIdSearchParams defines parameters for GetColIdSearch.

type GetColIdSearchParamsOrd

type GetColIdSearchParamsOrd string

GetColIdSearchParamsOrd defines parameters for GetColIdSearch.

type GetColIdSearchResponse

type GetColIdSearchResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SearchResult
}

func ParseGetColIdSearchResponse

func ParseGetColIdSearchResponse(rsp *http.Response) (*GetColIdSearchResponse, error)

ParseGetColIdSearchResponse parses an HTTP response from a GetColIdSearchWithResponse call

func (GetColIdSearchResponse) Status

func (r GetColIdSearchResponse) Status() string

Status returns HTTPResponse.Status

func (GetColIdSearchResponse) StatusCode

func (r GetColIdSearchResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCollectionsResponse

type GetCollectionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CollectionsInfo
}

func ParseGetCollectionsResponse

func ParseGetCollectionsResponse(rsp *http.Response) (*GetCollectionsResponse, error)

ParseGetCollectionsResponse parses an HTTP response from a GetCollectionsWithResponse call

func (GetCollectionsResponse) Status

func (r GetCollectionsResponse) Status() string

Status returns HTTPResponse.Status

func (GetCollectionsResponse) StatusCode

func (r GetCollectionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPositionsGroupColIdPathParams

type GetPositionsGroupColIdPathParams struct {
	// Filters only positions for finished folders
	Finished *Finished `json:"finished,omitempty"`

	// Filters only positions for unfinished folders
	Unfinished *Unfinished `json:"unfinished,omitempty"`

	// Filters positions that are older than this timestamp  (unix time in ms)
	From *From `json:"from,omitempty"`

	// Filters positions that are newer or equal than this timestamp  (unix time in ms)
	To *To `json:"to,omitempty"`

	// Recursively look for all subdirectories
	Rec *bool `json:"rec,omitempty"`
}

GetPositionsGroupColIdPathParams defines parameters for GetPositionsGroupColIdPath.

type GetPositionsGroupColIdPathResponse

type GetPositionsGroupColIdPathResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *interface{}
}

func ParseGetPositionsGroupColIdPathResponse

func ParseGetPositionsGroupColIdPathResponse(rsp *http.Response) (*GetPositionsGroupColIdPathResponse, error)

ParseGetPositionsGroupColIdPathResponse parses an HTTP response from a GetPositionsGroupColIdPathWithResponse call

func (GetPositionsGroupColIdPathResponse) Status

Status returns HTTPResponse.Status

func (GetPositionsGroupColIdPathResponse) StatusCode

func (r GetPositionsGroupColIdPathResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPositionsGroupLastResponse

type GetPositionsGroupLastResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Position
}

func ParseGetPositionsGroupLastResponse

func ParseGetPositionsGroupLastResponse(rsp *http.Response) (*GetPositionsGroupLastResponse, error)

ParseGetPositionsGroupLastResponse parses an HTTP response from a GetPositionsGroupLastWithResponse call

func (GetPositionsGroupLastResponse) Status

Status returns HTTPResponse.Status

func (GetPositionsGroupLastResponse) StatusCode

func (r GetPositionsGroupLastResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPositionsGroupParams

type GetPositionsGroupParams struct {
	// Filters only positions for finished folders
	Finished *Finished `json:"finished,omitempty"`

	// Filters only positions for unfinished folders
	Unfinished *Unfinished `json:"unfinished,omitempty"`

	// Filters positions that are older than this timestamp  (unix time in ms)
	From *From `json:"from,omitempty"`

	// Filters positions that are newer or equal than this timestamp  (unix time in ms)
	To *To `json:"to,omitempty"`
}

GetPositionsGroupParams defines parameters for GetPositionsGroup.

type GetPositionsGroupResponse

type GetPositionsGroupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Position
}

func ParseGetPositionsGroupResponse

func ParseGetPositionsGroupResponse(rsp *http.Response) (*GetPositionsGroupResponse, error)

ParseGetPositionsGroupResponse parses an HTTP response from a GetPositionsGroupWithResponse call

func (GetPositionsGroupResponse) Status

func (r GetPositionsGroupResponse) Status() string

Status returns HTTPResponse.Status

func (GetPositionsGroupResponse) StatusCode

func (r GetPositionsGroupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTranscodingsResponse

type GetTranscodingsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TranscodingsInfo
}

func ParseGetTranscodingsResponse

func ParseGetTranscodingsResponse(rsp *http.Response) (*GetTranscodingsResponse, error)

ParseGetTranscodingsResponse parses an HTTP response from a GetTranscodingsWithResponse call

func (GetTranscodingsResponse) Status

func (r GetTranscodingsResponse) Status() string

Status returns HTTPResponse.Status

func (GetTranscodingsResponse) StatusCode

func (r GetTranscodingsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Group

type Group string

Group defines model for Group.

type GroupInPath

type GroupInPath string

GroupInPath defines model for GroupInPath.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Ordering

type Ordering string

Ordering defines model for Ordering.

const (
	A Ordering = "a"

	M Ordering = "m"
)

Defines values for Ordering.

type Path

type Path string

Path defines model for Path.

type Position

type Position struct {
	// Collection number (index in names from response in /collections endpoint)
	Collection int32 `json:"collection"`

	// Audio file (or chapter)
	File string `json:"file"`

	// Audio folder path
	Folder string `json:"folder"`

	// Folder was listened to the end
	FolderFinished *bool `json:"folder_finished,omitempty"`

	// Position in audiofile in seconds
	Position float32 `json:"position"`

	// Position timestamp - unix time in ms
	// Timestamp is generated on server, so if you post new  position
	// it is used to check, if there is not newer position,
	// but actual value then is assigned by server
	Timestamp int64 `json:"timestamp"`
}

Playback position

type PostAuthenticateJSONBody

type PostAuthenticateJSONBody SharedSecret

PostAuthenticateJSONBody defines parameters for PostAuthenticate.

type PostAuthenticateJSONRequestBody

type PostAuthenticateJSONRequestBody PostAuthenticateJSONBody

PostAuthenticateJSONRequestBody defines body for PostAuthenticate for application/json ContentType.

type PostAuthenticateResponse

type PostAuthenticateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePostAuthenticateResponse

func ParsePostAuthenticateResponse(rsp *http.Response) (*PostAuthenticateResponse, error)

ParsePostAuthenticateResponse parses an HTTP response from a PostAuthenticateWithResponse call

func (PostAuthenticateResponse) Status

func (r PostAuthenticateResponse) Status() string

Status returns HTTPResponse.Status

func (PostAuthenticateResponse) StatusCode

func (r PostAuthenticateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostPositionsGroupJSONBody

type PostPositionsGroupJSONBody Position

PostPositionsGroupJSONBody defines parameters for PostPositionsGroup.

type PostPositionsGroupJSONRequestBody

type PostPositionsGroupJSONRequestBody PostPositionsGroupJSONBody

PostPositionsGroupJSONRequestBody defines body for PostPositionsGroup for application/json ContentType.

type PostPositionsGroupResponse

type PostPositionsGroupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePostPositionsGroupResponse

func ParsePostPositionsGroupResponse(rsp *http.Response) (*PostPositionsGroupResponse, error)

ParsePostPositionsGroupResponse parses an HTTP response from a PostPositionsGroupWithResponse call

func (PostPositionsGroupResponse) Status

Status returns HTTPResponse.Status

func (PostPositionsGroupResponse) StatusCode

func (r PostPositionsGroupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type SearchResult

type SearchResult struct {
	// Not used now, only subfolders are searched
	Files      *[]AudioFile `json:"files,omitempty"`
	Subfolders *[]Subfolder `json:"subfolders,omitempty"`
}

SearchResult defines model for SearchResult.

type SharedSecret

type SharedSecret struct {
	// Salted shared secret
	Secret string `json:"secret"`
}

SharedSecret defines model for SharedSecret.

type Subfolder

type Subfolder struct {
	// was folder listened to the end (by given group, valid only if group parameter was provided)
	Finished *bool `json:"finished,omitempty"`

	// Is virtual folder - e.g. representing big chapterized file (.m4b etc.)
	IsFile *bool `json:"is_file,omitempty"`

	// last modification timestamp (unix time in miliseconds)
	Modified *float32 `json:"modified,omitempty"`
	Name     string   `json:"name"`
	Path     string   `json:"path"`
}

Subfolder defines model for Subfolder.

type To

type To int64

To defines model for To.

type Transcoding

type Transcoding struct {
	// Average bitrate of the transcoding in kbps
	Bitrate int `json:"bitrate"`

	// Name of transcoding in form of audio_codec-in-container, for instance opus-in-ogg
	Name string `json:"name"`
}

Transcoding defines model for Transcoding.

type TranscodingsInfo

type TranscodingsInfo struct {
	High *Transcoding `json:"high,omitempty"`
	Low  *Transcoding `json:"low,omitempty"`

	// Maximum number of parallel transcodings allowed by server
	MaxTranscodings *int         `json:"max_transcodings,omitempty"`
	Medium          *Transcoding `json:"medium,omitempty"`
}

TranscodingsInfo defines model for TranscodingsInfo.

type TypedFile

type TypedFile struct {
	// mime type of the file
	Mime string `json:"mime"`

	// path to the file with collection
	Path string `json:"path"`
}

TypedFile defines model for TypedFile.

type Unfinished

type Unfinished bool

Unfinished defines model for Unfinished.

Jump to

Keyboard shortcuts

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