resource

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCreateInput

func ValidateCreateInput(rci *model.ResourceCreateInput) error

Types

type AccessEndpoint

type AccessEndpoint struct {
	// Name is identifier for the endpoint.
	Name string `json:"name,omitempty"`
	// Endpoint is access endpoint.
	Endpoints []string `json:"endpoints,omitempty"`
}

type CollectionCreateRequest

type CollectionCreateRequest struct {
	model.ResourceCreateInputs `path:",inline" json:",inline"`

	ResourceRunInfo `json:",inline"`

	Draft bool `json:"draft,default=false"`
}

func (*CollectionCreateRequest) Validate

func (r *CollectionCreateRequest) Validate() error

type CollectionCreateResponse

type CollectionCreateResponse = []*model.ResourceOutput

type CollectionDeleteRequest

type CollectionDeleteRequest struct {
	model.ResourceDeleteInputs `path:",inline" json:",inline"`

	WithoutCleanup bool `query:"withoutCleanup,omitempty"`
	Preview        bool `query:"preview,omitempty"`
}

func (*CollectionDeleteRequest) Validate

func (r *CollectionDeleteRequest) Validate() error

type CollectionGetRequest

type CollectionGetRequest struct {
	model.ResourceQueryInputs `path:",inline" query:",inline"`

	runtime.RequestCollection[
		predicate.Resource, resource.OrderOption,
	] `query:",inline"`

	WithSchema bool `query:"withSchema,omitempty"`

	Stream *runtime.RequestUnidiStream
}

func (*CollectionGetRequest) SetStream

func (r *CollectionGetRequest) SetStream(stream runtime.RequestUnidiStream)

type CollectionGetResponse

type CollectionGetResponse = []*model.ResourceOutput

type CollectionRouteStartRequest added in v0.5.0

type CollectionRouteStartRequest struct {
	StartInputs `path:",inline" json:",inline"`

	ChangeComment string `json:"changeComment"`
	Preview       bool   `json:"preview,default=false"`

	Resources []*model.Resource `json:"-"`
	// contains filtered or unexported fields
}

func (*CollectionRouteStartRequest) Validate added in v0.5.0

func (r *CollectionRouteStartRequest) Validate() error

type CollectionRouteStopRequest added in v0.5.0

type CollectionRouteStopRequest struct {
	model.ResourceDeleteInputs `path:",inline" json:",inline"`

	ChangeComment string `json:"changeComment"`
	Preview       bool   `json:"preview,default=false"`

	Resources []*model.Resource `json:"-"`
	// contains filtered or unexported fields
}

func (*CollectionRouteStopRequest) Validate added in v0.5.0

func (r *CollectionRouteStopRequest) Validate() error

type CollectionRouteUpgradeRequest added in v0.5.0

type CollectionRouteUpgradeRequest struct {
	model.ResourceUpdateInputs `path:",inline" json:",inline"`

	ResourceRunInfo `json:",inline"`

	Draft           bool `json:"draft,default=false"`
	ReuseAttributes bool `json:"reuseAttributes,default=false"`
	// contains filtered or unexported fields
}

func (*CollectionRouteUpgradeRequest) Validate added in v0.5.0

func (r *CollectionRouteUpgradeRequest) Validate() error

type CreateRequest

type CreateRequest struct {
	model.ResourceCreateInput `path:",inline" json:",inline"`

	ResourceRunInfo `json:",inline"`

	Draft bool `json:"draft,default=false"`
}

func (*CreateRequest) Validate

func (r *CreateRequest) Validate() error

type CreateResponse

type CreateResponse = *model.ResourceOutput

type DeleteRequest

type DeleteRequest struct {
	model.ResourceDeleteInput `path:",inline"`

	WithoutCleanup bool `query:"withoutCleanup,omitempty"`
	Preview        bool `query:"preview,omitempty"`
}

func (*DeleteRequest) Validate

func (r *DeleteRequest) Validate() error

type GetRequest

type GetRequest = model.ResourceQueryInput

type GetResponse

type GetResponse = *model.ResourceOutput

type GraphEdge

type GraphEdge = types.GraphEdge

GraphEdge defines the edge of graph.

type GraphVertex

type GraphVertex = types.GraphVertex

GraphVertex defines the vertex of graph.

type GraphVertexID

type GraphVertexID = types.GraphVertexID

GraphVertexID defines the identifier of the vertex, which uniquely represents an API resource.

type Handler

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

func Handle

func Handle(mc model.ClientSet, kc *rest.Config, sm *storage.Manager) Handler

func (Handler) CollectionCreate

func (Handler) CollectionDelete

func (h Handler) CollectionDelete(req CollectionDeleteRequest) error

func (Handler) CollectionGet

func (h Handler) CollectionGet(req CollectionGetRequest) (CollectionGetResponse, int, error)

func (Handler) CollectionRouteStart added in v0.5.0

func (h Handler) CollectionRouteStart(req CollectionRouteStartRequest) error

func (Handler) CollectionRouteStop added in v0.5.0

func (h Handler) CollectionRouteStop(req CollectionRouteStopRequest) error

func (Handler) CollectionRouteUpgrade added in v0.5.0

func (h Handler) CollectionRouteUpgrade(req CollectionRouteUpgradeRequest) error

func (Handler) Create

func (h Handler) Create(req CreateRequest) (CreateResponse, error)

func (Handler) Delete

func (h Handler) Delete(req DeleteRequest) (err error)

func (Handler) Get

func (h Handler) Get(req GetRequest) (GetResponse, error)

func (Handler) Kind

func (Handler) Kind() string

func (Handler) Patch added in v0.5.0

func (h Handler) Patch(req PatchRequest) error

func (Handler) RouteGetEndpoints added in v0.5.0

func (Handler) RouteGetGraph

func (h Handler) RouteGetGraph(req RouteGetGraphRequest) (*RouteGetGraphResponse, error)

func (Handler) RouteGetOutputs

func (h Handler) RouteGetOutputs(req RouteGetOutputsRequest) (RouteGetOutputsResponse, error)

func (Handler) RouteRollback

func (h Handler) RouteRollback(req RouteRollbackRequest) error

func (Handler) RouteStart

func (h Handler) RouteStart(req RouteStartRequest) error

func (Handler) RouteStop

func (h Handler) RouteStop(req RouteStopRequest) error

func (Handler) RouteUpgrade

func (h Handler) RouteUpgrade(req RouteUpgradeRequest) error

func (Handler) SubResourceHandlers

func (h Handler) SubResourceHandlers() []runtime.IResourceHandler

type PatchRequest added in v0.5.0

type PatchRequest struct {
	model.ResourcePatchInput `path:",inline" json:",inline"`

	ResourceRunInfo `json:",inline"`

	Draft bool `json:"draft,default=false"`
}

func (*PatchRequest) Validate added in v0.5.0

func (r *PatchRequest) Validate() error

type PatchResponse added in v0.6.0

type PatchResponse struct {
	*model.ResourceOutput

	Run *model.ResourceRunOutput `json:"run"`
}

type ResourceRunInfo added in v0.6.0

type ResourceRunInfo struct {
	Preview       bool              `json:"preview,default=false"`
	ChangeComment string            `json:"changeComment,omitempty"`
	RunLabels     map[string]string `json:"runLabels,omitempty"`
}

type RouteGetEndpointsRequest added in v0.5.0

type RouteGetEndpointsRequest struct {
	model.ResourceQueryInput `path:",inline"`

	Stream *runtime.RequestUnidiStream
	// contains filtered or unexported fields
}

func (*RouteGetEndpointsRequest) SetStream added in v0.5.0

type RouteGetEndpointsResponse added in v0.5.0

type RouteGetEndpointsResponse = types.ResourceEndpoints

type RouteGetGraphRequest

type RouteGetGraphRequest struct {
	model.ResourceQueryInput `path:",inline"`

	WithoutKeys bool `query:"withoutKeys,omitempty"`
	// contains filtered or unexported fields
}

type RouteGetGraphResponse

type RouteGetGraphResponse struct {
	Vertices []GraphVertex `json:"vertices"`
	Edges    []GraphEdge   `json:"edges"`
}

type RouteGetOutputsRequest

type RouteGetOutputsRequest struct {
	model.ResourceQueryInput `path:",inline"`

	Stream *runtime.RequestUnidiStream
	// contains filtered or unexported fields
}

func (*RouteGetOutputsRequest) SetStream

func (r *RouteGetOutputsRequest) SetStream(stream runtime.RequestUnidiStream)

type RouteGetOutputsResponse

type RouteGetOutputsResponse = []types.OutputValue

type RouteRollbackRequest

type RouteRollbackRequest struct {
	model.ResourceQueryInput `path:",inline"`

	RunID object.ID `query:"runID"`

	ChangeComment string `json:"changeComment"`
	Preview       bool   `json:"preview,default=false"`
	// contains filtered or unexported fields
}

func (*RouteRollbackRequest) Validate

func (r *RouteRollbackRequest) Validate() error

type RouteStartRequest

type RouteStartRequest struct {
	model.ResourceQueryInput `path:",inline"`

	ChangeComment string `json:"changeComment"`
	Preview       bool   `json:"preview,default=false"`
	// contains filtered or unexported fields
}

func (*RouteStartRequest) Validate

func (r *RouteStartRequest) Validate() error

type RouteStopRequest

type RouteStopRequest struct {
	model.ResourceDeleteInput `path:",inline"`

	ChangeComment string `json:"changeComment"`
	Preview       bool   `json:"preview,default=false"`
	// contains filtered or unexported fields
}

func (*RouteStopRequest) Validate

func (r *RouteStopRequest) Validate() error

type RouteUpgradeRequest

type RouteUpgradeRequest struct {
	model.ResourceUpdateInput `path:",inline" json:",inline"`

	ResourceRunInfo `json:",inline"`

	Draft           bool `json:"draft,default=false"`
	ReuseAttributes bool `json:"reuseAttributes,default=false"`
	// contains filtered or unexported fields
}

func (*RouteUpgradeRequest) Validate

func (r *RouteUpgradeRequest) Validate() error

type StartInputs added in v0.5.0

type StartInputs = model.ResourceDeleteInputs

Jump to

Keyboard shortcuts

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