api

package
v0.0.0-...-13d6dd4 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Namespace string
	Host      string
	Port      string
	Token     string
	CA        string
	Dest      string
	Base      string
	Bearer    string
	Transport *http.Transport
}

Config The API config

func ClientConfig

func ClientConfig() Config

ClientConfig Returns the API config

func (Config) Get

func (api Config) Get(request string, reply interface{})

Get a data structure from the request string

func (Config) Post

func (api Config) Post(request string, deliver interface{})

Post a JSON data structure to the API request string

type GenericHeader

type GenericHeader struct {
	APIVersion string   `json:"APIVersion"`
	Kind       string   `json:"kind"`
	Metadata   Metadata `json:"metadata"`
}

GenericHeader generic k8s header format so we can use any object type.

type Metadata

type Metadata struct {
	Name            string            `json:"name"`
	Namespace       string            `json:"namespace"`
	Labels          map[string]string `json:"labels"`
	Annotations     map[string]string `json:"annotations"`
	ManagedFields   []interface{}     `json:"managedFields"`
	ResourceVersion string            `json:"resourceVersion"`
}

Metadata standard metadata k8s structure

type Secret

type Secret struct {
	APIVersion string            `json:"APIVersion"`
	Kind       string            `json:"kind"`
	Metadata   Metadata          `json:"metadata"`
	Data       map[string]string `json:"data"`
}

Secret standard structure of a k8s secret

type ServiceAccountEvent

type ServiceAccountEvent struct {
	Type           string         `json:"type"`
	ServiceAccount Serviceaccount `json:"object"`
}

ServiceAccountEvent - currently unused

type Serviceaccount

type Serviceaccount struct {
	APIVersion string                  `json:"APIVersion"`
	Kind       string                  `json:"kind"`
	Metadata   Metadata                `json:"metadata"`
	Secrets    []ServiceaccountSecrets `json:"secrets"`
}

Serviceaccount Standard k8s service account object

type ServiceaccountSecrets

type ServiceaccountSecrets struct {
	Name string `json:"name"`
}

ServiceaccountSecrets The secret field for a service account token

Jump to

Keyboard shortcuts

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