Documentation
¶
Index ¶
- func InferKind[M any]() string
- type HttpClient
- type ListOptions
- type MeshObjectApi
- func (c MeshObjectApi) DeleteAtPath(ctx context.Context, id string, extraPath ...string) (err error)
- func (c MeshObjectApi) GetAtPath[R any](ctx context.Context, id string, extraPath ...string) (R, error)
- func (c MeshObjectApi) ListSeqAs[T any](ctx context.Context, listOptions ListOptions, options ...http.RequestOption) iter.Seq2[T, error]
- func (c MeshObjectApi) MeshObjectMimeType() string
- func (c MeshObjectApi) PostAtPath[R, P any](ctx context.Context, payload P, extraPath ...string) (R, error)
- type MeshObjectClient
- func (c MeshObjectClient[M]) Delete(ctx context.Context, id string) (err error)
- func (c MeshObjectClient[M]) Get(ctx context.Context, id string) (resp *M, err error)
- func (c MeshObjectClient[M]) List(ctx context.Context, options ...http.RequestOption) ([]M, error)
- func (c MeshObjectClient[M]) ListSeq(ctx context.Context, options ...http.RequestOption) iter.Seq2[M, error]
- func (c MeshObjectClient[M]) Post[P any](ctx context.Context, payload P) (*M, error)
- func (c MeshObjectClient[M]) Put[P any](ctx context.Context, id string, payload P) (*M, error)
- type Page
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HttpClient ¶
type HttpClient struct {
http.AuthorizedClient
EndpointUrl xurl.URL
}
type ListOptions ¶ added in v0.2.0
type MeshObjectApi ¶ added in v0.3.0
MeshObjectApi is the API of one meshObject kind, in one version, with no Go type for its objects: the requests and the paging they share, for a caller that decodes the answers itself.
func (MeshObjectApi) DeleteAtPath ¶ added in v0.3.0
func (MeshObjectApi) ListSeqAs ¶ added in v0.3.0
func (c MeshObjectApi) ListSeqAs[T any](ctx context.Context, listOptions ListOptions, options ...http.RequestOption) iter.Seq2[T, error]
func (MeshObjectApi) MeshObjectMimeType ¶ added in v0.3.0
func (c MeshObjectApi) MeshObjectMimeType() string
func (MeshObjectApi) PostAtPath ¶ added in v0.3.0
type MeshObjectClient ¶
type MeshObjectClient[M any] struct { MeshObjectApi }
MeshObjectClient decodes the API's objects into M, whose type name gives the kind.
func NewMeshObjectClient ¶
func NewMeshObjectClient[M any](ctx context.Context, httpClient HttpClient, apiVersion string, explicitApiPathElems ...string) MeshObjectClient[M]
NewMeshObjectClient takes the API path from the kind of M, in plural and lower case, unless explicitApiPathElems is given. Only the user and group binding APIs of workspaces and projects break that convention.
func (MeshObjectClient[M]) Delete ¶
func (c MeshObjectClient[M]) Delete(ctx context.Context, id string) (err error)
func (MeshObjectClient[M]) Get ¶
func (c MeshObjectClient[M]) Get(ctx context.Context, id string) (resp *M, err error)
func (MeshObjectClient[M]) List ¶
func (c MeshObjectClient[M]) List(ctx context.Context, options ...http.RequestOption) ([]M, error)
func (MeshObjectClient[M]) ListSeq ¶ added in v0.2.0
func (c MeshObjectClient[M]) ListSeq(ctx context.Context, options ...http.RequestOption) iter.Seq2[M, error]
Click to show internal directories.
Click to hide internal directories.