meta

package
v0.0.0-...-a134451 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EventTypeNormal Information only and will not cause any problems
	EventTypeNormal string = "Normal"
	// EventTypeWarning These events are to warn that something might go wrong
	EventTypeWarning string = "Warning"
)

Valid values for event types (new types could be added in future)

View Source
const (
	StatusSuccess = "Success"
	StatusFailure = "Failure"
)

Values of Status.Status

Variables

View Source
var Everything = SelectionPredicate{
	Label: "",
	Field: "",
}

Everything accepts all objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: constant.GroupName, Version: "v1"}

SchemeGroupVersion is group version used to register these objects

Functions

func DefaultClusterScopedAttr

func DefaultClusterScopedAttr(obj runtime.Object) (map[string]string, map[string]string, error)

func ExtractList

func ExtractList(obj runtime.Object) ([]runtime.Object, error)

ExtractList returns obj's Items element as an array of runtime.Objects. Returns an error if obj is not a List type (does not have an Items member).

func FactoryNewObject

func FactoryNewObject(kind string) runtime.Object

func HasObjectMetaSystemFieldValues

func HasObjectMetaSystemFieldValues(meta Object) bool

HasObjectMetaSystemFieldValues returns true if fields that are managed by the system on ObjectMeta have values.

func SetZeroValue

func SetZeroValue(objPtr runtime.Object) error

Types

type AttrFunc

type AttrFunc func(obj runtime.Object) (map[string]string, map[string]string, error)

AttrFunc returns label and field sets and the uninitialized flag for List or Watch to match. In any failure to parse given object, it returns error.

type Binding

type Binding struct {
	TypeMeta
	ObjectMeta

	Target Worker `json:"target,omitempty"`
}

func (*Binding) DeepCopyObject

func (m *Binding) DeepCopyObject() runtime.Object

func (*Binding) GetObjectKind

func (m *Binding) GetObjectKind() schema.ObjectKind

type Code

type Code struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:",inline"`

	Describe string `json:"describe,omitempty"`
	Runtime  string `json:"runtime,omitempty"`
	Code     string `json:"code,omitempty"`
}

func (*Code) DeepCopyObject

func (m *Code) DeepCopyObject() runtime.Object

func (*Code) GetObjectKind

func (m *Code) GetObjectKind() schema.ObjectKind

type CodeList

type CodeList struct {
	TypeMeta `json:",inline"`
	ListMeta `json:",inline"`

	Items []Code `json:"items"`
}

func (*CodeList) DeepCopyObject

func (m *CodeList) DeepCopyObject() runtime.Object

func (*CodeList) GetObjectKind

func (m *CodeList) GetObjectKind() schema.ObjectKind

type Common

type Common interface {
	GetResourceVersion() string
	SetResourceVersion(version string)
}

Common lets you work with core metadata from any of the versioned or internal API objects. Attempting to set or retrieve a field on an object that does not support that field will be a no-op and return a default value.

func CommonAccessor

func CommonAccessor(obj interface{}) (Common, error)

CommonAccessor returns a Common interface for the provided object or an error if the object does not provide List.

type Connection

type Connection struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:",inline"`

	Type     ProviderType `json:"type,omitempty"`
	Describe string       `json:"describe,omitempty"`
	Host     string       `json:"host,omitempty"`
	Schema   string       `json:"schema,omitempty"`
	Login    string       `json:"login,omitempty"`
	Password string       `json:"password,omitempty"`
	Port     int          `json:"port,omitempty"`
	Extra    string       `json:"extra,omitempty"`
}

func (*Connection) DeepCopyObject

func (m *Connection) DeepCopyObject() runtime.Object

func (*Connection) GetObjectKind

func (m *Connection) GetObjectKind() schema.ObjectKind

type ConnectionList

type ConnectionList struct {
	TypeMeta `json:",inline"`
	ListMeta `json:",inline"`

	Items []Connection `json:"items"`
}

func (*ConnectionList) DeepCopyObject

func (m *ConnectionList) DeepCopyObject() runtime.Object

func (*ConnectionList) GetObjectKind

func (m *ConnectionList) GetObjectKind() schema.ObjectKind

type CreateOptions

type CreateOptions struct {
	TypeMeta `json:",inline"`

	// When present, indicates that modifications should not be
	// persisted. An invalid or unrecognized dryRun directive will
	// result in an error response and no further processing of the
	// request. Valid values are:
	// - All: all dry run stages will be processed
	DryRun []string `json:"dryRun,omitempty"`

	// fieldManager is a name associated with the actor or entity
	// that is making these changes. The value must be less than or
	// 128 characters long, and only contain printable characters,
	// as defined by https://golang.org/pkg/unicode/#IsPrint.
	FieldManager string `json:"fieldManager,omitempty"`

	// fieldValidation instructs the server on how to handle
	// objects in the request (POST/PUT/PATCH) containing unknown
	// or duplicate fields, provided that the `ServerSideFieldValidation`
	// feature gate is also enabled. Valid values are:
	// - Ignore: This will ignore any unknown fields that are silently
	// dropped from the object, and will ignore all but the last duplicate
	// field that the decoder encounters. This is the default behavior
	// prior to v1.23 and is the default behavior when the
	// `ServerSideFieldValidation` feature gate is disabled.
	// - Warn: This will send a warning via the standard warning response
	// header for each unknown field that is dropped from the object, and
	// for each duplicate field that is encountered. The request will
	// still succeed if there are no other errors, and will only persist
	// the last of any duplicate fields. This is the default when the
	// `ServerSideFieldValidation` feature gate is enabled.
	// - Strict: This will fail the request with a BadRequest error if
	// any unknown fields would be dropped from the object, or if any
	// duplicate fields are present. The error returned from the server
	// will contain all unknown and duplicate fields encountered.
	FieldValidation string `json:"fieldValidation,omitempty"`
}

CreateOptions may be provided when creating an API object.

type Dag

type Dag struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:",inline"`

	WorkflowUID string `json:"workflowUID,omitempty"`
	Nodes       []Node `json:"nodes"`
	Edges       []Edge `json:"edges"`
}

func (*Dag) DeepCopyObject

func (m *Dag) DeepCopyObject() runtime.Object

func (*Dag) GetObjectKind

func (m *Dag) GetObjectKind() schema.ObjectKind

func (*Dag) Validate

func (m *Dag) Validate() error

type DagList

type DagList struct {
	TypeMeta `json:",inline"`
	ListMeta `json:",inline"`

	Items []Dag `json:"items"`
}

func (*DagList) DeepCopyObject

func (m *DagList) DeepCopyObject() runtime.Object

func (*DagList) GetObjectKind

func (m *DagList) GetObjectKind() schema.ObjectKind

type Dashboard

type Dashboard struct {
	WorkflowAmount int64 `json:"workflowAmount"`
	CodeAmount     int64 `json:"codeAmount"`
	VariableAmount int64 `json:"variableAmount"`
	WorkerAmount   int64 `json:"workerAmount"`

	Data []DashboardData `json:"data,omitempty"`
}

type DashboardData

type DashboardData struct {
	Date     string `json:"date"`
	Schedule int    `json:"schedule"`
}

type DeleteOptions

type DeleteOptions struct {
	TypeMeta `json:",inline"`

	// The duration in seconds before the object should be deleted. Value must be non-negative integer.
	// The value zero indicates delete immediately. If this value is nil, the default grace period for the
	// specified type will be used.
	// Defaults to a per object value if not specified. zero means delete immediately.
	GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"`

	// Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
	// returned.
	Preconditions *Preconditions `json:"preconditions,omitempty"`

	// Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7.
	// Should the dependent objects be orphaned. If true/false, the "orphan"
	// finalizer will be added to/removed from the object's finalizers list.
	// Either this field or PropagationPolicy may be set, but not both.
	OrphanDependents *bool `json:"orphanDependents,omitempty"`

	// Whether and how garbage collection will be performed.
	// Either this field or OrphanDependents may be set, but not both.
	// The default policy is decided by the existing finalizer set in the
	// metadata.finalizers and the resource-specific default policy.
	// Acceptable values are: 'Orphan' - orphan the dependents; 'Background' -
	// allow the garbage collector to delete the dependents in the background;
	// 'Foreground' - a cascading policy that deletes all dependents in the
	// foreground.
	PropagationPolicy *string `json:"propagationPolicy,omitempty"`

	// When present, indicates that modifications should not be
	// persisted. An invalid or unrecognized dryRun directive will
	// result in an error response and no further processing of the
	// request. Valid values are:
	// - All: all dry run stages will be processed
	DryRun []string `json:"dryRun,omitempty"`
}

DeleteOptions may be provided when deleting an API object.

type Edge

type Edge struct {
	Id                string `json:"id,omitempty"`
	Source            string `json:"source,omitempty"`
	Target            string `json:"target,omitempty"`
	SourcePortId      string `json:"sourcePortId,omitempty"`
	TargetPortId      string `json:"targetPortId,omitempty"`
	Label             string `json:"label,omitempty"`
	EdgeContentWidth  int    `json:"edgeContentWidth,omitempty"`
	EdgeContentHeight int    `json:"edgeContentHeight,omitempty"`
	Connector         struct {
		Name string `json:"name,omitempty"`
	} `json:"connector"`
	Router struct {
		Name string `json:"name,omitempty"`
	} `json:"router"`
	SourcePort string `json:"sourcePort,omitempty"`
	TargetPort string `json:"targetPort,omitempty"`
}

type Event

type Event struct {
	TypeMeta `json:",inline"`
	// Standard object's metadata.
	ObjectMeta `json:",inline"`

	// The object that this event is about.
	InvolvedObject ObjectReference `json:"involvedObject"`

	// This should be a short, machine understandable string that gives the reason
	// for the transition into the object's current status.
	Reason string `json:"reason,omitempty"`

	// A human-readable description of the status of this operation.
	Message string `json:"message,omitempty"`

	// The component reporting this event. Should be a short machine understandable string.
	Source EventSource `json:"source,omitempty"`

	// The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
	FirstTimestamp time.Time `json:"firstTimestamp,omitempty"`

	// The time at which the most recent occurrence of this event was recorded.
	LastTimestamp *time.Time `json:"lastTimestamp,omitempty"`

	// The number of times this event has occurred.
	Count int32 `json:"count,omitempty"`

	// Type of this event (Normal, Warning), new types could be added in the future
	// +optional
	Type string `json:"type,omitempty"`

	// Time when this Event was first observed.
	EventTime *time.Time `json:"eventTime,omitempty"`

	// Data about the Event series this event represents or nil if it's a singleton Event.
	Series *EventSeries `json:"series,omitempty"`

	// What action was taken/failed regarding the Regarding object.
	Action string `json:"action,omitempty"`

	// Optional secondary object for more complex actions.
	Related *ObjectReference `json:"related,omitempty"`

	// Name of the controller that emitted this Event.
	ReportingController string `json:"reportingComponent"`

	// ID of the controller instance.
	ReportingInstance string `json:"reportingInstance"`

	// note is a human-readable description of the status of this operation.
	// Maximal length of the note is 1kB, but libraries should be prepared to
	// handle values up to 64kB.
	Note string `json:"note,omitempty"`

	// regarding contains the object this Event is about. In most cases it's an Object reporting controller
	// implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because
	// it acts on some changes in a ReplicaSet object.
	Regarding ObjectReference `json:"regarding,omitempty"`
}

Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.

func (*Event) DeepCopyObject

func (m *Event) DeepCopyObject() runtime.Object

func (*Event) GetObjectKind

func (m *Event) GetObjectKind() schema.ObjectKind

type EventList

type EventList struct {
	TypeMeta `json:",inline"`
	ListMeta `json:",inline"`

	Items []Event `json:"items"`
}

func (*EventList) DeepCopyObject

func (m *EventList) DeepCopyObject() runtime.Object

func (*EventList) GetObjectKind

func (m *EventList) GetObjectKind() schema.ObjectKind

type EventSeries

type EventSeries struct {
	// Number of occurrences in this series up to the last heartbeat time
	Count int32 `json:"count,omitempty"`
	// Time of the last occurrence observed
	LastObservedTime *time.Time `json:"lastObservedTime,omitempty"`
}

EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.

type EventSource

type EventSource struct {
	// Component from which the event is generated.
	Component string `json:"component,omitempty"`
	// Node name on which the event is generated.
	Host string `json:"host,omitempty"`
}

EventSource contains information for an event.

type GetOptions

type GetOptions struct {
	TypeMeta `json:",inline"`
	// resourceVersion sets a constraint on what resource versions a request may be served from.
	//
	// Defaults to unset
	ResourceVersion string `json:"resourceVersion,omitempty"`

	// IgnoreNotFound determines what is returned if the requested object is not found. If
	// true, a zero object is returned. If false, an error is returned.
	IgnoreNotFound bool
}

GetOptions is the standard query options to the standard REST get call.

type Job

type Job struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:",inline"`

	WorkflowUID         string     `json:"workflowUID"`
	State               JobState   `json:"state,omitempty"`
	CompletionTimestamp *time.Time `json:"completionTimestamp,omitempty"`

	StartTime *time.Time `json:"-"`
}

func (*Job) DeepCopyObject

func (m *Job) DeepCopyObject() runtime.Object

func (*Job) GetObjectKind

func (m *Job) GetObjectKind() schema.ObjectKind

type JobList

type JobList struct {
	TypeMeta `json:",inline"`
	ListMeta `json:",inline"`

	Items []Job `json:"items"`
}

func (*JobList) DeepCopyObject

func (m *JobList) DeepCopyObject() runtime.Object

func (*JobList) GetObjectKind

func (m *JobList) GetObjectKind() schema.ObjectKind

type JobState

type JobState string
const (
	JobCreate          JobState = "create"
	JobFailed          JobState = "failed"
	JobStage           JobState = "stage"
	JobQueued          JobState = "queued"
	JobRunning         JobState = "running"
	JobScheduled       JobState = "scheduled"
	JobSkipped         JobState = "skipped"
	JobSuccess         JobState = "success"
	JobUpForReschedule JobState = "up_for_reschedule"
	JobUpForRetry      JobState = "up_for_retry"
	JobUpstreamFailed  JobState = "upstream_failed"
)

type List

type List ListInterface

func ListAccessor

func ListAccessor(obj interface{}) (List, error)

type ListInterface

type ListInterface interface {
	GetResourceVersion() string
	SetResourceVersion(version string)
	GetContinue() string
	SetContinue(c string)
	GetRemainingItemCount() *int64
	SetRemainingItemCount(c *int64)
}

ListInterface lets you work with list metadata from any of the versioned or internal API objects. Attempting to set or retrieve a field on an object that does not support that field will be a no-op and return a default value.

type ListMeta

type ListMeta struct {
	// String that identifies the server's internal version of this object that
	// can be used by clients to determine when objects have changed.
	// Value must be treated as opaque by clients and passed unmodified back to the server.
	// Populated by the system.
	// Read-only.
	ResourceVersion string `json:"resourceVersion,omitempty"`

	// continue may be set if the user set a limit on the number of items returned, and indicates that
	// the server has more data available. The value is opaque and may be used to issue another request
	// to the endpoint that served this list to retrieve the next set of available objects. Continuing a
	// consistent list may not be possible if the server configuration has changed or more than a few
	// minutes have passed. The resourceVersion field returned when using this continue value will be
	// identical to the value in the first response, unless you have received this token from an error
	// message.
	Continue string `json:"continue,omitempty"`

	// remainingItemCount is the number of subsequent items in the list which are not included in this
	// list response. If the list request contained label or field selectors, then the number of
	// remaining items is unknown and the field will be left unset and omitted during serialization.
	// If the list is complete (either because it is not chunking or because this is the last chunk),
	// then there are no more remaining items and this field will be left unset and omitted during
	// serialization.
	// Servers older than v1.15 do not set this field.
	// The intended use of the remainingItemCount is *estimating* the size of a collection. Clients
	// should not rely on the remainingItemCount to be set or to be exact.
	// +optional
	RemainingItemCount *int64 `json:"remainingItemCount,omitempty"`
}

ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.

func (*ListMeta) GetContinue

func (l *ListMeta) GetContinue() string

func (*ListMeta) GetListMeta

func (l *ListMeta) GetListMeta() List

func (*ListMeta) GetRemainingItemCount

func (l *ListMeta) GetRemainingItemCount() *int64

func (*ListMeta) GetResourceVersion

func (l *ListMeta) GetResourceVersion() string

func (*ListMeta) SetContinue

func (l *ListMeta) SetContinue(c string)

func (*ListMeta) SetRemainingItemCount

func (l *ListMeta) SetRemainingItemCount(c *int64)

func (*ListMeta) SetResourceVersion

func (l *ListMeta) SetResourceVersion(version string)

type ListMetaAccessor

type ListMetaAccessor interface {
	GetListMeta() List
}

type ListOptions

type ListOptions struct {
	TypeMeta `json:",inline"`

	// A selector to restrict the list of returned objects by their labels.
	// Defaults to everything.
	LabelSelector string `json:"labelSelector,omitempty"`
	// A selector to restrict the list of returned objects by their fields.
	// Defaults to everything.
	FieldSelector string `json:"fieldSelector,omitempty"`

	// Watch for changes to the described resources and return them as a stream of
	// add, update, and remove notifications. Specify resourceVersion.
	// +optional
	Watch bool `json:"watch,omitempty"`
	// allowWatchBookmarks requests watch events with type "BOOKMARK".
	// Servers that do not implement bookmarks may ignore this flag and
	// bookmarks are sent at the server's discretion. Clients should not
	// assume bookmarks are returned at any specific interval, nor may they
	// assume the server will send any BOOKMARK event during a session.
	// If this is not a watch, this field is ignored.
	AllowWatchBookmarks bool `json:"allowWatchBookmarks,omitempty"`

	// resourceVersion sets a constraint on what resource versions a request may be served from.
	//
	// Defaults to unset
	ResourceVersion string `json:"resourceVersion,omitempty"`

	// resourceVersionMatch determines how resourceVersion is applied to list calls.
	// It is highly recommended that resourceVersionMatch be set for list calls where
	// resourceVersion is set
	//
	// Defaults to unset
	ResourceVersionMatch string `json:"resourceVersionMatch,omitempty"`
	// Timeout for the list/watch call.
	// This limits the duration of the call, regardless of any activity or inactivity.
	TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"`

	// limit is a maximum number of responses to return for a list call. If more items exist, the
	// server will set the `continue` field on the list metadata to a value that can be used with the
	// same initial query to retrieve the next set of results. Setting a limit may return fewer than
	// the requested amount of items (up to zero items) in the event all requested objects are
	// filtered out and clients should only use the presence of the continue field to determine whether
	// more results are available. Servers may choose not to support the limit argument and will return
	// all the available results. If limit is specified and the continue field is empty, clients may
	// assume that no more results are available. This field is not supported if watch is true.
	//
	// The server guarantees that the objects returned when using continue will be identical to issuing
	// a single list call without a limit - that is, no objects created, modified, or deleted after the
	// first request is issued will be included in any subsequent continued requests. This is sometimes
	// referred to as a consistent snapshot, and ensures that a client that is using limit to receive
	// smaller chunks of a very large result can ensure they see all possible objects. If objects are
	// updated during a chunked list the version of the object that was present at the time the first list
	// result was calculated is returned.
	Limit int64 `json:"limit,omitempty"`
	// The continue option should be set when retrieving more results from the server. Since this value is
	// server defined, clients may only use to continue value from a previous query result with identical
	// query parameters (except for the value of continue) and the server may reject a continued value it
	// does not recognize. If the specified continue value is no longer valid whether due to expiration
	// (generally five to fifteen minutes) or a configuration change on the server, the server will
	// respond with a 410 ResourceExpired error together with a continued token. If the client needs a
	// consistent list, it must restart their list without the continue field. Otherwise, the client may
	// send another list request with the token received with the 410 error, the server will respond with
	// a list starting from the next key, but from the latest snapshot, which is inconsistent from the
	// previous list results - objects that are created, modified, or deleted after the first list request
	// will be included in the response, as long as their keys are after the "next key".
	//
	// This field is not supported when watch is true. Clients may start a watch from the last
	// resourceVersion value returned by the server and not miss any modifications.
	Continue string `json:"continue,omitempty"`

	// Predicate provides the selection rules for the list operation.
	Predicate SelectionPredicate
	// Recursive determines whether the list or watch is defined for a single object located at the
	// given key, or for the whole set of objects with the given key as a prefix.
	Recursive bool `json:"recursive,omitempty"`
	// ProgressNotify determines whether storage-originated bookmark (progress notify) events should
	// be delivered to the users. The option is ignored for non-watch requests.
	ProgressNotify bool `json:"progressNotify,omitempty"`
}

ListOptions is the query options to a standard REST list call.

type Node

type Node struct {
	Id        string `json:"id,omitempty"`
	X         int    `json:"x,omitempty"`
	Y         int    `json:"y,omitempty"`
	Width     int    `json:"width,omitempty"`
	Height    int    `json:"height,omitempty"`
	Label     string `json:"label,omitempty"`
	RenderKey string `json:"renderKey,omitempty"`
	IsGroup   bool   `json:"isGroup,omitempty"`
	Group     string `json:"group,omitempty"`
	ParentId  string `json:"parentId,omitempty"`
	Ports     []struct {
		Id        string `json:"id,omitempty"`
		Group     string `json:"group,omitempty"`
		Type      string `json:"type,omitempty"`
		Tooltip   string `json:"tooltip,omitempty"`
		Connected bool   `json:"connected,omitempty"`
	} `json:"ports,omitempty"`
	Order       int        `json:"_order,omitempty"`
	Code        string     `json:"code"`
	Variables   []string   `json:"variables"`
	Connections []string   `json:"connections"`
	Status      NodeStatus `json:"status,omitempty"`
}

type NodeStatus

type NodeStatus string
const (
	NodeDefault    NodeStatus = "default"
	NodeSuccess    NodeStatus = "success"
	NodeProcessing NodeStatus = "processing"
	NodeError      NodeStatus = "error"
	NodeWarning    NodeStatus = "warning"
)

type Object

type Object interface {
	GetName() string
	SetName(name string)
	GetUID() string
	SetUID(uid string)
	GetResourceVersion() string
	SetResourceVersion(version string)
	GetGeneration() int64
	SetGeneration(generation int64)
	GetCreationTimestamp() *time.Time
	SetCreationTimestamp(timestamp *time.Time)
	GetDeletionTimestamp() *time.Time
	SetDeletionTimestamp(timestamp *time.Time)
	GetDeletionGracePeriodSeconds() *int64
	SetDeletionGracePeriodSeconds(*int64)
	GetLabels() map[string]string
	SetLabels(labels map[string]string)
}

Object lets you work with object metadata from any of the versioned or internal API objects. Attempting to set or retrieve a field on an object that does not support that field (Name, UID, Namespace on lists) will be a no-op and return a default value.

func Accessor

func Accessor(obj interface{}) (Object, error)

type ObjectMeta

type ObjectMeta struct {
	Name string `json:"name,omitempty"`
	UID  string `json:"uid,omitempty"`

	ResourceVersion string `json:"resourceVersion,omitempty"`
	Generation      int64  `json:"generation,omitempty"`

	CreationTimestamp          *time.Time `json:"creationTimestamp,omitempty"`
	DeletionTimestamp          *time.Time `json:"deletionTimestamp,omitempty"`
	DeletionGracePeriodSeconds *int64     `json:"deletionGracePeriodSeconds,omitempty"`

	Labels map[string]string `json:"labels,omitempty"`

	Finalizers []string `json:"finalizers,omitempty"`
}

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

func (*ObjectMeta) GetCreationTimestamp

func (o *ObjectMeta) GetCreationTimestamp() *time.Time

func (*ObjectMeta) GetDeletionGracePeriodSeconds

func (o *ObjectMeta) GetDeletionGracePeriodSeconds() *int64

func (*ObjectMeta) GetDeletionTimestamp

func (o *ObjectMeta) GetDeletionTimestamp() *time.Time

func (*ObjectMeta) GetGeneration

func (o *ObjectMeta) GetGeneration() int64

func (*ObjectMeta) GetLabels

func (o *ObjectMeta) GetLabels() map[string]string

func (*ObjectMeta) GetName

func (o *ObjectMeta) GetName() string

func (*ObjectMeta) GetObjectMeta

func (o *ObjectMeta) GetObjectMeta() Object

func (*ObjectMeta) GetResourceVersion

func (o *ObjectMeta) GetResourceVersion() string

func (*ObjectMeta) GetUID

func (o *ObjectMeta) GetUID() string

func (*ObjectMeta) SetCreationTimestamp

func (o *ObjectMeta) SetCreationTimestamp(timestamp *time.Time)

func (*ObjectMeta) SetDeletionGracePeriodSeconds

func (o *ObjectMeta) SetDeletionGracePeriodSeconds(i *int64)

func (*ObjectMeta) SetDeletionTimestamp

func (o *ObjectMeta) SetDeletionTimestamp(timestamp *time.Time)

func (*ObjectMeta) SetGeneration

func (o *ObjectMeta) SetGeneration(generation int64)

func (*ObjectMeta) SetLabels

func (o *ObjectMeta) SetLabels(labels map[string]string)

func (*ObjectMeta) SetName

func (o *ObjectMeta) SetName(name string)

func (*ObjectMeta) SetResourceVersion

func (o *ObjectMeta) SetResourceVersion(version string)

func (*ObjectMeta) SetUID

func (o *ObjectMeta) SetUID(uid string)

type ObjectMetaAccessor

type ObjectMetaAccessor interface {
	GetObjectMeta() Object
}

type ObjectReference

type ObjectReference struct {
	// Kind of the referent.
	Kind string `json:"kind,omitempty"`
	// Name of the referent.
	Name string `json:"name,omitempty"`
	// UID of the referent.
	UID string `json:"uid,omitempty"`
	// API version of the referent.
	APIVersion string `json:"apiVersion,omitempty"`
	// Specific resourceVersion to which this reference is made, if any.
	ResourceVersion string `json:"resourceVersion,omitempty"`

	// If referring to a piece of an object instead of an entire object, this string
	// should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
	// For example, if the object reference is to a container within a stage, this would take on a value like:
	// "spec.containers{name}" (where "name" refers to the name of the container that triggered
	// the event) or if no container name is specified "spec.containers[2]" (container with
	// index 2 in this stage). This syntax is chosen only to have some well-defined way of
	// referencing a part of an object.
	FieldPath string `json:"fieldPath,omitempty"`
}

func (*ObjectReference) DeepCopyObject

func (m *ObjectReference) DeepCopyObject() runtime.Object

func (*ObjectReference) GetObjectKind

func (m *ObjectReference) GetObjectKind() schema.ObjectKind

type PatchOptions

type PatchOptions struct {
	TypeMeta `json:",inline"`

	// When present, indicates that modifications should not be
	// persisted. An invalid or unrecognized dryRun directive will
	// result in an error response and no further processing of the
	// request. Valid values are:
	// - All: all dry run stages will be processed
	DryRun []string `json:"dryRun,omitempty"`

	// Force is going to "force" Apply requests. It means user will
	// re-acquire conflicting fields owned by other people. Force
	// flag must be unset for non-apply patch requests.
	Force *bool `json:"force,omitempty"`

	// fieldManager is a name associated with the actor or entity
	// that is making these changes. The value must be less than or
	// 128 characters long, and only contain printable characters,
	// as defined by https://golang.org/pkg/unicode/#IsPrint. This
	// field is required for apply requests
	// (application/apply-patch) but optional for non-apply patch
	// types (JsonPatch, MergePatch, StrategicMergePatch).
	// +optional
	FieldManager string `json:"fieldManager,omitempty"`

	// fieldValidation instructs the server on how to handle
	// objects in the request (POST/PUT/PATCH) containing unknown
	// or duplicate fields, provided that the `ServerSideFieldValidation`
	// feature gate is also enabled. Valid values are:
	// - Ignore: This will ignore any unknown fields that are silently
	// dropped from the object, and will ignore all but the last duplicate
	// field that the decoder encounters. This is the default behavior
	// prior to v1.23 and is the default behavior when the
	// `ServerSideFieldValidation` feature gate is disabled.
	// - Warn: This will send a warning via the standard warning response
	// header for each unknown field that is dropped from the object, and
	// for each duplicate field that is encountered. The request will
	// still succeed if there are no other errors, and will only persist
	// the last of any duplicate fields. This is the default when the
	// `ServerSideFieldValidation` feature gate is enabled.
	// - Strict: This will fail the request with a BadRequest error if
	// any unknown fields would be dropped from the object, or if any
	// duplicate fields are present. The error returned from the server
	// will contain all unknown and duplicate fields encountered.
	// +optional
	FieldValidation string `json:"fieldValidation,omitempty"`
}

PatchOptions may be provided when patching an API object. PatchOptions is meant to be a superset of UpdateOptions.

type PatchType

type PatchType string

PatchType Similarly to above, these are constants to support HTTP PATCH utilized by both the client and server that didn't make sense for a whole package to be dedicated to.

const (
	JSONPatchType           PatchType = "application/json-patch+json"
	MergePatchType          PatchType = "application/merge-patch+json"
	StrategicMergePatchType PatchType = "application/strategic-merge-patch+json"
	ApplyPatchType          PatchType = "application/apply-patch+yaml"
)

type Policy

type Policy struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:",inline"`

	Key   string `json:"key"`
	PType string `json:"ptype"`
	V0    string `json:"v0"`
	V1    string `json:"v1"`
	V2    string `json:"v2"`
	V3    string `json:"v3"`
	V4    string `json:"v4"`
	V5    string `json:"v5"`
}

func (*Policy) DeepCopyObject

func (m *Policy) DeepCopyObject() runtime.Object

func (*Policy) GetObjectKind

func (m *Policy) GetObjectKind() schema.ObjectKind

type PolicyList

type PolicyList struct {
	TypeMeta `json:",inline"`
	ListMeta `json:",inline"`

	Items []Policy `json:"items"`
}

func (*PolicyList) DeepCopyObject

func (m *PolicyList) DeepCopyObject() runtime.Object

func (*PolicyList) GetObjectKind

func (m *PolicyList) GetObjectKind() schema.ObjectKind

type Preconditions

type Preconditions struct {
	// Specifies the target UID.
	UID *string `json:"uid,omitempty"`
	// Specifies the target ResourceVersion
	ResourceVersion *string `json:"resourceVersion,omitempty"`
}

Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.

type ProviderType

type ProviderType string
const (
	ProviderAmazonS3 ProviderType = "amazon_s3"
	ProviderMySQL    ProviderType = "mysql"
	ProviderRedis    ProviderType = "redis"
)

type RawExtension

type RawExtension struct {
	TypeMeta `json:",inline"`
	// Raw is the underlying serialization of this object.
	Raw []byte `json:"raw,omitempty"`
	// Object can hold a representation of this extension - useful for working with versioned
	// structs.
	Object runtime.Object `json:"object,omitempty"`
}

func (*RawExtension) DeepCopyObject

func (m *RawExtension) DeepCopyObject() runtime.Object

func (*RawExtension) GetObjectKind

func (m *RawExtension) GetObjectKind() schema.ObjectKind

type Role

type Role struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:",inline"`

	Verbs     []string `json:"verbs,omitempty"`
	Resources []string `json:"resources,omitempty"`
}

func (*Role) DeepCopyObject

func (m *Role) DeepCopyObject() runtime.Object

func (*Role) GetObjectKind

func (m *Role) GetObjectKind() schema.ObjectKind

type RoleList

type RoleList struct {
	TypeMeta `json:",inline"`
	ListMeta `json:",inline"`

	Items []Role `json:"items"`
}

func (*RoleList) DeepCopyObject

func (m *RoleList) DeepCopyObject() runtime.Object

func (*RoleList) GetObjectKind

func (m *RoleList) GetObjectKind() schema.ObjectKind

type SelectionPredicate

type SelectionPredicate struct {
	Label               string
	Field               string
	GetAttrs            AttrFunc
	IndexLabels         []string
	IndexFields         []string
	Limit               int64
	Continue            string
	AllowWatchBookmarks bool
}

SelectionPredicate is used to represent the way to select objects from api storage.

func (*SelectionPredicate) Empty

func (s *SelectionPredicate) Empty() bool

Empty returns true if the predicate performs no filtering.

func (*SelectionPredicate) Matches

func (s *SelectionPredicate) Matches(obj runtime.Object) (bool, error)

Matches returns true if the given object's labels and fields (as returned by s.GetAttrs) match s.Label and s.Field. An error is returned if s.GetAttrs fails.

func (*SelectionPredicate) MatchesSingle

func (s *SelectionPredicate) MatchesSingle() (string, bool)

MatchesSingle will return (name, true) if and only if s.Field matches on the object's name.

type Stage

type Stage struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:",inline"`

	SchedulerName string `json:"schedulerName,omitempty"`
	Priority      int    `json:"priority,omitempty"`
	WorkerUID     string `json:"workerUID,omitempty"`
	WorkerHost    string `json:"workerHost,omitempty"`

	WorkflowUID string `json:"workflowUID,omitempty"`
	JobUID      string `json:"jobUID,omitempty"`
	DagUID      string `json:"dagUID,omitempty"`
	NodeID      string `json:"nodeID,omitempty"`

	State StageState `json:"state,omitempty"`

	Runtime     string       `json:"runtime,omitempty"`
	Code        string       `json:"code,omitempty"`
	Connections []Connection `json:"connections,omitempty"`
	Variables   []Variable   `json:"variables,omitempty"`

	DependNodeId []string `json:"dependNodeId,omitempty"`

	Input  interface{} `json:"input,omitempty"`
	Output interface{} `json:"output,omitempty"`
}

func (*Stage) DeepCopyObject

func (m *Stage) DeepCopyObject() runtime.Object

func (*Stage) GetObjectKind

func (m *Stage) GetObjectKind() schema.ObjectKind

type StageList

type StageList struct {
	TypeMeta `json:",inline"`
	ListMeta `json:",inline"`

	Items []Stage `json:"items"`
}

func (*StageList) DeepCopyObject

func (m *StageList) DeepCopyObject() runtime.Object

func (*StageList) GetObjectKind

func (m *StageList) GetObjectKind() schema.ObjectKind

type StageState

type StageState string
const (
	StageCreate  StageState = "create"
	StageReady   StageState = "ready"
	StageBind    StageState = "bind"
	StageSuccess StageState = "success"
	StageFailed  StageState = "failed"
)

type State

type State struct {
	TypeMeta `json:",inline"`

	State string `json:"state"`
}

func (*State) DeepCopyObject

func (m *State) DeepCopyObject() runtime.Object

func (*State) GetObjectKind

func (m *State) GetObjectKind() schema.ObjectKind

type Status

type Status struct {
	TypeMeta `json:",inline"`
	// Standard list metadata.
	ListMeta `json:",inline"`

	// Status of the operation.
	// One of: "Success" or "Failure".
	Status string `json:"status,omitempty"`
	// A human-readable description of the status of this operation.
	Message string `json:"message,omitempty"`
	// A machine-readable description of why this operation is in the
	// "Failure" status. If this value is empty there
	// is no information available. A Reason clarifies an HTTP status
	// code but does not override it.
	Reason string `json:"reason,omitempty"`
	// Extended data associated with the reason.  Each reason may define its
	// own extended details. This field is optional and the data returned
	// is not guaranteed to conform to any schema except that defined by
	// the reason type.
	Details *StatusDetails `json:"details,omitempty"`
	// Suggested HTTP return code for this status, 0 if not set.
	Code int32 `json:"code,omitempty"`
}

Status is a return value for calls that don't return other objects.

func (*Status) DeepCopyObject

func (m *Status) DeepCopyObject() runtime.Object

func (*Status) GetObjectKind

func (m *Status) GetObjectKind() schema.ObjectKind

type StatusDetails

type StatusDetails struct {
	// The name attribute of the resource associated with the status StatusReason
	// (when there is a single name which can be described).
	Name string `json:"name,omitempty"`
	// The group attribute of the resource associated with the status StatusReason.
	Group string `json:"group,omitempty"`
	// The kind attribute of the resource associated with the status StatusReason.
	// On some operations may differ from the requested resource Kind.
	Kind string `json:"kind,omitempty"`
	// UID of the resource.
	// (when there is a single resource which can be described).
	// +optional
	UID string `json:"uid,omitempty"`
	// The Causes array includes more details associated with the StatusReason
	// failure. Not all StatusReasons may provide detailed causes.
	Causes []string `json:"causes,omitempty"`
	// If specified, the time in seconds before the operation should be retried. Some errors may indicate
	// the client must take an alternate action - for those errors this field may indicate how long to wait
	// before taking the alternate action.
	RetryAfterSeconds int32 `json:"retryAfterSeconds,omitempty"`
}

StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.

type TriggerType

type TriggerType string
const (
	TriggerManual  TriggerType = "manual"
	TriggerCron    TriggerType = "cron"
	TriggerWebhook TriggerType = "webhook"
	TriggerWatch   TriggerType = "watch"
)

type TypeMeta

type TypeMeta struct {
	// Kind is a string value representing the REST resource this object represents.
	// Servers may infer this from the endpoint the client submits requests to.
	// Cannot be updated.
	// In CamelCase.
	Kind string `json:"kind,omitempty"`

	// APIVersion defines the versioned schema of this representation of an object.
	// Servers should convert recognized schemas to the latest internal value, and
	// may reject unrecognized values.
	APIVersion string `json:"apiVersion,omitempty"`
}

TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.

func (*TypeMeta) GroupVersionKind

func (t *TypeMeta) GroupVersionKind() schema.GroupVersionKind

func (*TypeMeta) SetGroupVersionKind

func (t *TypeMeta) SetGroupVersionKind(kind schema.GroupVersionKind)

type Unknown

type Unknown struct {
	TypeMeta `json:",inline"`
	// Raw will hold the complete serialized object which couldn't be matched
	// with a registered type. Most likely, nothing should be done with this
	// except for passing it through the system.
	Raw []byte
	// ContentEncoding is encoding used to encode 'Raw' data.
	// Unspecified means no encoding.
	ContentEncoding string
	// ContentType  is serialization method used to serialize 'Raw'.
	// Unspecified means ContentTypeJSON.
	ContentType string
}

func (*Unknown) DeepCopyObject

func (m *Unknown) DeepCopyObject() runtime.Object

func (*Unknown) GetObjectKind

func (m *Unknown) GetObjectKind() schema.ObjectKind

type UpdateOptions

type UpdateOptions struct {
	TypeMeta `json:",inline"`

	// When present, indicates that modifications should not be
	// persisted. An invalid or unrecognized dryRun directive will
	// result in an error response and no further processing of the
	// request. Valid values are:
	// - All: all dry run stages will be processed
	DryRun []string `json:"dryRun,omitempty"`

	// fieldManager is a name associated with the actor or entity
	// that is making these changes. The value must be less than or
	// 128 characters long, and only contain printable characters,
	// as defined by https://golang.org/pkg/unicode/#IsPrint.
	FieldManager string `json:"fieldManager,omitempty"`

	// fieldValidation instructs the server on how to handle
	// objects in the request (POST/PUT/PATCH) containing unknown
	// or duplicate fields, provided that the `ServerSideFieldValidation`
	// feature gate is also enabled. Valid values are:
	// - Ignore: This will ignore any unknown fields that are silently
	// dropped from the object, and will ignore all but the last duplicate
	// field that the decoder encounters. This is the default behavior
	// prior to v1.23 and is the default behavior when the
	// `ServerSideFieldValidation` feature gate is disabled.
	// - Warn: This will send a warning via the standard warning response
	// header for each unknown field that is dropped from the object, and
	// for each duplicate field that is encountered. The request will
	// still succeed if there are no other errors, and will only persist
	// the last of any duplicate fields. This is the default when the
	// `ServerSideFieldValidation` feature gate is enabled.
	// - Strict: This will fail the request with a BadRequest error if
	// any unknown fields would be dropped from the object, or if any
	// duplicate fields are present. The error returned from the server
	// will contain all unknown and duplicate fields encountered.
	FieldValidation string `json:"fieldValidation,omitempty"`
}

UpdateOptions may be provided when updating an API object. All fields in UpdateOptions should also be present in PatchOptions.

type User

type User struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:",inline"`

	Password    string `json:"password,omitempty"`
	Email       string `json:"email,omitempty"`
	Active      bool   `json:"active,omitempty"`
	Avatar      string `json:"avatar,omitempty"`
	UnreadCount int    `json:"unreadCount,omitempty"`

	Groups []string `json:"groups,omitempty"`
	Roles  []string `json:"roles,omitempty"`
}

func (*User) DeepCopyObject

func (m *User) DeepCopyObject() runtime.Object

func (*User) GetObjectKind

func (m *User) GetObjectKind() schema.ObjectKind

type UserClaims

type UserClaims struct {
	*jwt.RegisteredClaims `json:",inline"`
}

type UserList

type UserList struct {
	TypeMeta `json:",inline"`
	ListMeta `json:",inline"`

	Items []User `json:"items"`
}

func (*UserList) DeepCopyObject

func (m *UserList) DeepCopyObject() runtime.Object

func (*UserList) GetObjectKind

func (m *UserList) GetObjectKind() schema.ObjectKind

type UserSession

type UserSession struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:",inline"`

	UserUID  string `json:"userUID,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
	Token    string `json:"token,omitempty"`
}

func (*UserSession) DeepCopyObject

func (m *UserSession) DeepCopyObject() runtime.Object

func (*UserSession) GetObjectKind

func (m *UserSession) GetObjectKind() schema.ObjectKind

type Variable

type Variable struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:",inline"`

	Value    string `json:"value,omitempty"`
	Describe string `json:"describe,omitempty"`
}

func (*Variable) DeepCopyObject

func (m *Variable) DeepCopyObject() runtime.Object

func (*Variable) GetObjectKind

func (m *Variable) GetObjectKind() schema.ObjectKind

type VariableList

type VariableList struct {
	TypeMeta `json:",inline"`
	ListMeta `json:",inline"`

	Items []Variable `json:"items"`
}

func (*VariableList) DeepCopyObject

func (m *VariableList) DeepCopyObject() runtime.Object

func (*VariableList) GetObjectKind

func (m *VariableList) GetObjectKind() schema.ObjectKind

type WatchEvent

type WatchEvent struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:",inline"`

	Type   string       `json:"type"`
	Object RawExtension `json:"object"`
}

func (*WatchEvent) DeepCopyObject

func (m *WatchEvent) DeepCopyObject() runtime.Object

func (*WatchEvent) GetObjectKind

func (m *WatchEvent) GetObjectKind() schema.ObjectKind

type Worker

type Worker struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:",inline"`

	State    WorkerState `json:"state,omitempty"`
	Hostname string      `json:"hostname,omitempty"`
	Runtimes []string    `json:"runtimes,omitempty"`
}

func (*Worker) DeepCopyObject

func (m *Worker) DeepCopyObject() runtime.Object

func (*Worker) GetObjectKind

func (m *Worker) GetObjectKind() schema.ObjectKind

type WorkerList

type WorkerList struct {
	TypeMeta `json:",inline"`
	ListMeta `json:",inline"`

	Items []Worker `json:"items"`
}

func (*WorkerList) DeepCopyObject

func (m *WorkerList) DeepCopyObject() runtime.Object

func (*WorkerList) GetObjectKind

func (m *WorkerList) GetObjectKind() schema.ObjectKind

type WorkerState

type WorkerState string
const (
	WorkerReady   WorkerState = "ready"
	WorkerNoReady WorkerState = "no_ready"
	WorkerUnknown WorkerState = "unknown"
)

type Workflow

type Workflow struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:",inline"`

	Describe                string      `json:"describe,omitempty"`
	Active                  bool        `json:"active,omitempty"`
	Trigger                 TriggerType `json:"trigger,omitempty"`
	TriggerParam            string      `json:"triggerParam,omitempty"`
	LastTriggerTimestamp    *time.Time  `json:"lastTriggerTimestamp,omitempty"`
	CurrentTriggerTimestamp *time.Time  `json:"currentTriggerTimestamp,omitempty"`
	LastSuccessfulTimestamp *time.Time  `json:"LastSuccessfulTimestamp,omitempty"`

	StartingDeadlineSeconds    *int64   `json:"-"`
	FailedJobsHistoryLimit     *int32   `json:"-"`
	SuccessfulJobsHistoryLimit *int32   `json:"-"`
	JobActive                  []string `json:"-"`
}

func (*Workflow) DeepCopyObject

func (m *Workflow) DeepCopyObject() runtime.Object

func (*Workflow) GetObjectKind

func (m *Workflow) GetObjectKind() schema.ObjectKind

type WorkflowList

type WorkflowList struct {
	TypeMeta `json:",inline"`
	ListMeta `json:",inline"`

	Items []Workflow `json:"items"`
}

func (*WorkflowList) DeepCopyObject

func (m *WorkflowList) DeepCopyObject() runtime.Object

func (*WorkflowList) GetObjectKind

func (m *WorkflowList) GetObjectKind() schema.ObjectKind

Jump to

Keyboard shortcuts

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