k8s

package
v0.0.0-...-d57ad21 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GroupName k8s group name for the external resource
	GroupName = "dev.okteto.com"
	// GroupVersion k8s version for ExternalResource resource
	GroupVersion = "v1"
)
View Source
const (
	// ExternalResourceResource defines the resource of ExternalResource
	ExternalResourceResource = "externals"

	// ExternalResourceKind defines the kind of the resource external
	ExternalResourceKind = "External"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	Name string `json:"name"`
	Url  string `json:"url"`
}

Endpoint represents the endpoint information of a external resource

func (*Endpoint) DeepCopy

func (in *Endpoint) DeepCopy() *Endpoint

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint.

func (*Endpoint) DeepCopyInto

func (in *Endpoint) DeepCopyInto(out *Endpoint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type External

type External struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	Spec ExternalResourceSpec `json:"spec"`
}

External represents the resource retrieved and stored in Kubernetes

func (*External) DeepCopy

func (in *External) DeepCopy() *External

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalResource.

func (*External) DeepCopyInto

func (in *External) DeepCopyInto(out *External)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*External) DeepCopyObject

func (in *External) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ExternalList

type ExternalList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []External `json:"items"`
}

ExternalList represents the resource when a list of external resource items is requested

func (*ExternalList) DeepCopy

func (in *ExternalList) DeepCopy() *ExternalList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalResourceList.

func (*ExternalList) DeepCopyInto

func (in *ExternalList) DeepCopyInto(out *ExternalList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExternalList) DeepCopyObject

func (in *ExternalList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ExternalResourceInterface

type ExternalResourceInterface interface {
	Update(ctx context.Context, external *External) (*External, error)
	Get(ctx context.Context, name string, options metav1.GetOptions) (*External, error)
	Create(ctx context.Context, external *External, options metav1.CreateOptions) (*External, error)
	List(ctx context.Context, options metav1.ListOptions) (*ExternalList, error)
}

ExternalResourceInterface defines the operations for the external resource item Kubernetes client

type ExternalResourceSpec

type ExternalResourceSpec struct {
	Icon      string     `json:"icon,omitempty"`
	Name      string     `json:"name"`
	Notes     *Notes     `json:"notes"`
	Endpoints []Endpoint `json:"endpoints"`
}

ExternalResourceSpec represents the spec of a external resource. The information we store for each resource

func (*ExternalResourceSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalResourceSpec.

func (*ExternalResourceSpec) DeepCopyInto

func (in *ExternalResourceSpec) DeepCopyInto(out *ExternalResourceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalResourceV1Client

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

ExternalResourceV1Client client to work with ExternalResources v1 resources

func NewForConfig

func NewForConfig(cfg *rest.Config) (*ExternalResourceV1Client, error)

NewForConfig creates a new client for ExternalResourceV1 or error

func (*ExternalResourceV1Client) ExternalResources

func (c *ExternalResourceV1Client) ExternalResources(namespace string) ExternalResourceInterface

ExternalResources returns an instance of ExternalResourceInterface

type ExternalResourceV1Interface

type ExternalResourceV1Interface interface {
	ExternalResources(namespace string) ExternalResourceInterface
}

ExternalResourceV1Interface defines a method to get a ExternalResourceInterface

func GetExternalClient

func GetExternalClient(config *rest.Config) (ExternalResourceV1Interface, error)

type Notes

type Notes struct {
	Path     string `json:"path"`
	Markdown string `json:"markdown"`
}

Notes represents the path and markdown of a external resource

func (*Notes) DeepCopy

func (in *Notes) DeepCopy() *Notes

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Notes.

func (*Notes) DeepCopyInto

func (in *Notes) DeepCopyInto(out *Notes)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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