shared

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OperationSupport added in v0.5.0

type OperationSupport string

- `supported`: This operation is supported by both the provider and Finch

  • `not_supported_by_finch`: This operation is not supported by Finch but supported by the provider

  • `not_supported_by_provider`: This operation is not supported by the provider, so Finch cannot support

  • `client_access_only`: This behavior is supported by the provider, but only available to the client and not to Finch

const (
	OperationSupportSupported              OperationSupport = "supported"
	OperationSupportNotSupportedByFinch    OperationSupport = "not_supported_by_finch"
	OperationSupportNotSupportedByProvider OperationSupport = "not_supported_by_provider"
	OperationSupportClientAccessOnly       OperationSupport = "client_access_only"
)

type OperationSupportMatrix added in v0.5.0

type OperationSupportMatrix struct {
	// - `supported`: This operation is supported by both the provider and Finch
	//
	//   - `not_supported_by_finch`: This operation is not supported by Finch but
	//     supported by the provider
	//
	//   - `not_supported_by_provider`: This operation is not supported by the provider,
	//     so Finch cannot support
	//
	//   - `client_access_only`: This behavior is supported by the provider, but only
	//     available to the client and not to Finch
	Create OperationSupport `json:"create"`
	// - `supported`: This operation is supported by both the provider and Finch
	//
	//   - `not_supported_by_finch`: This operation is not supported by Finch but
	//     supported by the provider
	//
	//   - `not_supported_by_provider`: This operation is not supported by the provider,
	//     so Finch cannot support
	//
	//   - `client_access_only`: This behavior is supported by the provider, but only
	//     available to the client and not to Finch
	Delete OperationSupport `json:"delete"`
	// - `supported`: This operation is supported by both the provider and Finch
	//
	//   - `not_supported_by_finch`: This operation is not supported by Finch but
	//     supported by the provider
	//
	//   - `not_supported_by_provider`: This operation is not supported by the provider,
	//     so Finch cannot support
	//
	//   - `client_access_only`: This behavior is supported by the provider, but only
	//     available to the client and not to Finch
	Read OperationSupport `json:"read"`
	// - `supported`: This operation is supported by both the provider and Finch
	//
	//   - `not_supported_by_finch`: This operation is not supported by Finch but
	//     supported by the provider
	//
	//   - `not_supported_by_provider`: This operation is not supported by the provider,
	//     so Finch cannot support
	//
	//   - `client_access_only`: This behavior is supported by the provider, but only
	//     available to the client and not to Finch
	Update OperationSupport           `json:"update"`
	JSON   operationSupportMatrixJSON `json:"-"`
}

func (*OperationSupportMatrix) UnmarshalJSON added in v0.5.0

func (r *OperationSupportMatrix) UnmarshalJSON(data []byte) (err error)

type Page added in v0.7.0

type Page[T any] struct {
	Paging Paging   `json:"paging,required"`
	Data   []T      `json:"data"`
	JSON   pageJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*Page[T]) GetNextPage added in v0.7.0

func (r *Page[T]) GetNextPage() (res *Page[T], err error)

NextPage returns the next page as defined by this pagination style. When there is no next page, this function will return a 'nil' for the page value, but will not return an error

func (*Page[T]) SetPageConfig added in v0.7.0

func (r *Page[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)

func (*Page[T]) UnmarshalJSON added in v0.7.0

func (r *Page[T]) UnmarshalJSON(data []byte) (err error)

type PageAutoPager added in v0.7.0

type PageAutoPager[T any] struct {
	// contains filtered or unexported fields
}

func NewPageAutoPager added in v0.7.0

func NewPageAutoPager[T any](page *Page[T], err error) *PageAutoPager[T]

func (*PageAutoPager[T]) Current added in v0.7.0

func (r *PageAutoPager[T]) Current() T

func (*PageAutoPager[T]) Err added in v0.7.0

func (r *PageAutoPager[T]) Err() error

func (*PageAutoPager[T]) Index added in v0.7.0

func (r *PageAutoPager[T]) Index() int

func (*PageAutoPager[T]) Next added in v0.7.0

func (r *PageAutoPager[T]) Next() bool

type Paging added in v0.7.0

type Paging struct {
	// The total number of elements for the entire query (not just the given page)
	Count int64 `json:"count"`
	// The current start index of the returned list of elements
	Offset int64      `json:"offset"`
	JSON   pagingJSON `json:"-"`
}

func (*Paging) UnmarshalJSON added in v0.7.0

func (r *Paging) UnmarshalJSON(data []byte) (err error)

type ResponsesPage

type ResponsesPage[T any] struct {
	Responses []T               `json:"responses,required"`
	JSON      responsesPageJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*ResponsesPage[T]) GetNextPage

func (r *ResponsesPage[T]) GetNextPage() (res *ResponsesPage[T], err error)

NextPage returns the next page as defined by this pagination style. When there is no next page, this function will return a 'nil' for the page value, but will not return an error

func (*ResponsesPage[T]) SetPageConfig

func (r *ResponsesPage[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)

func (*ResponsesPage[T]) UnmarshalJSON

func (r *ResponsesPage[T]) UnmarshalJSON(data []byte) (err error)

type ResponsesPageAutoPager

type ResponsesPageAutoPager[T any] struct {
	// contains filtered or unexported fields
}

func NewResponsesPageAutoPager

func NewResponsesPageAutoPager[T any](page *ResponsesPage[T], err error) *ResponsesPageAutoPager[T]

func (*ResponsesPageAutoPager[T]) Current

func (r *ResponsesPageAutoPager[T]) Current() T

func (*ResponsesPageAutoPager[T]) Err

func (r *ResponsesPageAutoPager[T]) Err() error

func (*ResponsesPageAutoPager[T]) Index

func (r *ResponsesPageAutoPager[T]) Index() int

func (*ResponsesPageAutoPager[T]) Next

func (r *ResponsesPageAutoPager[T]) Next() bool

type SinglePage

type SinglePage[T any] struct {
	Items []T            `json:"-,inline"`
	JSON  singlePageJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*SinglePage[T]) GetNextPage

func (r *SinglePage[T]) GetNextPage() (res *SinglePage[T], err error)

NextPage returns the next page as defined by this pagination style. When there is no next page, this function will return a 'nil' for the page value, but will not return an error

func (*SinglePage[T]) SetPageConfig

func (r *SinglePage[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)

func (*SinglePage[T]) UnmarshalJSON

func (r *SinglePage[T]) UnmarshalJSON(data []byte) (err error)

type SinglePageAutoPager

type SinglePageAutoPager[T any] struct {
	// contains filtered or unexported fields
}

func NewSinglePageAutoPager

func NewSinglePageAutoPager[T any](page *SinglePage[T], err error) *SinglePageAutoPager[T]

func (*SinglePageAutoPager[T]) Current

func (r *SinglePageAutoPager[T]) Current() T

func (*SinglePageAutoPager[T]) Err

func (r *SinglePageAutoPager[T]) Err() error

func (*SinglePageAutoPager[T]) Index

func (r *SinglePageAutoPager[T]) Index() int

func (*SinglePageAutoPager[T]) Next

func (r *SinglePageAutoPager[T]) Next() bool

Jump to

Keyboard shortcuts

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