namespace

package
v3.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NamespaceKeyword defines the keyword identifying Namespace data.
	NamespaceKeyword = "namespace"
)

Variables

This section is empty.

Functions

func Key

func Key(namespace string) string

Key returns the key under which a configuration for the given namespace should be stored in the data-store.

func KeyPrefix

func KeyPrefix() string

KeyPrefix returns the key prefix used in the data-store to save the current state of every known K8s namespace.

func ParseNamespaceFromKey

func ParseNamespaceFromKey(key string) (namespace string, err error)

ParseNamespaceFromKey parses namespace id from the associated data-store key.

Types

type ID

type ID string

ID used to uniquely represent a K8s Namespace.

func GetID

func GetID(ns *Namespace) ID

GetID returns ID of a namespace.

func (ID) String

func (id ID) String() string

String returns a string representation of a namespace ID.

type Namespace

type Namespace struct {
	// Name of the namespace.
	// Cannot be updated.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// A list of labels attached to this namespace.
	// +optional
	Label                []*Namespace_Label `protobuf:"bytes,3,rep,name=label,proto3" json:"label,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

Namespace provides a scope for resource names.

func (*Namespace) Descriptor

func (*Namespace) Descriptor() ([]byte, []int)

func (*Namespace) GetLabel

func (m *Namespace) GetLabel() []*Namespace_Label

func (*Namespace) GetName

func (m *Namespace) GetName() string

func (*Namespace) ProtoMessage

func (*Namespace) ProtoMessage()

func (*Namespace) Reset

func (m *Namespace) Reset()

func (*Namespace) String

func (m *Namespace) String() string

func (*Namespace) XXX_DiscardUnknown added in v1.4.0

func (m *Namespace) XXX_DiscardUnknown()

func (*Namespace) XXX_Marshal added in v1.4.0

func (m *Namespace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Namespace) XXX_Merge added in v1.4.0

func (m *Namespace) XXX_Merge(src proto.Message)

func (*Namespace) XXX_Size added in v1.4.0

func (m *Namespace) XXX_Size() int

func (*Namespace) XXX_Unmarshal added in v1.4.0

func (m *Namespace) XXX_Unmarshal(b []byte) error

type Namespace_Label

type Namespace_Label struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value                string   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Label is a key/value pair attached to an object (namespace in this case). Labels are used to organize and to select subsets of objects.

func (*Namespace_Label) Descriptor

func (*Namespace_Label) Descriptor() ([]byte, []int)

func (*Namespace_Label) GetKey

func (m *Namespace_Label) GetKey() string

func (*Namespace_Label) GetValue

func (m *Namespace_Label) GetValue() string

func (*Namespace_Label) ProtoMessage

func (*Namespace_Label) ProtoMessage()

func (*Namespace_Label) Reset

func (m *Namespace_Label) Reset()

func (*Namespace_Label) String

func (m *Namespace_Label) String() string

func (*Namespace_Label) XXX_DiscardUnknown added in v1.4.0

func (m *Namespace_Label) XXX_DiscardUnknown()

func (*Namespace_Label) XXX_Marshal added in v1.4.0

func (m *Namespace_Label) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Namespace_Label) XXX_Merge added in v1.4.0

func (m *Namespace_Label) XXX_Merge(src proto.Message)

func (*Namespace_Label) XXX_Size added in v1.4.0

func (m *Namespace_Label) XXX_Size() int

func (*Namespace_Label) XXX_Unmarshal added in v1.4.0

func (m *Namespace_Label) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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