v1alpha1

package
v0.0.0-...-8fe0c81 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the tokens v1alpha1 API group +kubebuilder:object:generate=true +groupName=tokens.koobind.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "tokens.koobind.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type PasswordStatus

type PasswordStatus string
const PasswordStatusChecked PasswordStatus = "checked"
const PasswordStatusUnchecked PasswordStatus = "unchecked"
const PasswordStatusWrong PasswordStatus = "wrong"

type Token

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

	Spec   TokenSpec   `json:"spec,omitempty"`
	Status TokenStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced,shortName=ktoken;kootoken +kubebuilder:printcolumn:name="User name",type=string,JSONPath=`.spec.user.name` +kubebuilder:printcolumn:name="User ID",type=string,JSONPath=`.spec.user.uid` +kubebuilder:printcolumn:name="User Groups",type=string,JSONPath=`.spec.user.groups` +kubebuilder:printcolumn:name="Last hit",type=string,JSONPath=`.status.lastHit` Token is the Schema for the tokens API

func (*Token) DeepCopy

func (in *Token) DeepCopy() *Token

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

func (*Token) DeepCopyInto

func (in *Token) DeepCopyInto(out *Token)

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

func (*Token) DeepCopyObject

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

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

type TokenLifecycle

type TokenLifecycle struct {
	InactivityTimeout metav1.Duration `json:"inactivityTimeout"`
	MaxTTL            metav1.Duration `json:"maxTTL"`
	ClientTTL         metav1.Duration `json:"clientTTL"`
}

func (*TokenLifecycle) DeepCopy

func (in *TokenLifecycle) DeepCopy() *TokenLifecycle

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

func (*TokenLifecycle) DeepCopyInto

func (in *TokenLifecycle) DeepCopyInto(out *TokenLifecycle)

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

type TokenList

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

+kubebuilder:object:root=true TokenList contains a list of Token

func (*TokenList) DeepCopy

func (in *TokenList) DeepCopy() *TokenList

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

func (*TokenList) DeepCopyInto

func (in *TokenList) DeepCopyInto(out *TokenList)

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

func (*TokenList) DeepCopyObject

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

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

type TokenSpec

type TokenSpec struct {

	// +required
	User UserDesc `json:"user"`

	// +required
	Creation metav1.Time `json:"creation"`

	// +required
	Lifecycle TokenLifecycle `json:"lifecycle"`
}

K8s Name will be the token itself

func (*TokenSpec) DeepCopy

func (in *TokenSpec) DeepCopy() *TokenSpec

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

func (*TokenSpec) DeepCopyInto

func (in *TokenSpec) DeepCopyInto(out *TokenSpec)

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

type TokenStatus

type TokenStatus struct {
	LastHit metav1.Time `json:"lastHit"`
}

TokenStatus defines the observed state of Token

func (*TokenStatus) DeepCopy

func (in *TokenStatus) DeepCopy() *TokenStatus

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

func (*TokenStatus) DeepCopyInto

func (in *TokenStatus) DeepCopyInto(out *TokenStatus)

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

type UserDesc

type UserDesc struct {
	Name        string      `json:"name"`
	Uid         string      `json:"uid"`
	Groups      []string    `json:"groups"`
	Emails      []string    `json:"emails"`
	CommonNames []string    `json:"commonNames"`
	Authority   string      `json:"authority"` // The provider who validated the user password
	Entries     []UserEntry `json:"userEntries"`
}

User is the consolidated description of a user

func (*UserDesc) DeepCopy

func (in *UserDesc) DeepCopy() *UserDesc

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

func (*UserDesc) DeepCopyInto

func (in *UserDesc) DeepCopyInto(out *UserDesc)

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

type UserEntry

type UserEntry struct {
	ProviderName   string         `json:"provider"`  // Used for 'describe' command
	Authority      bool           `json:"authority"` // Is this provider Authority for authentication (password) for this user (A password is defined)
	Found          bool           `json:"found"`
	PasswordStatus PasswordStatus `json:"passwordStatus"` // For describe, always 'unchecked'
	Uid            string         `json:"uid"`            // Issued from the authoritative server (The first one which checked the password).
	Groups         []string       `json:"groups"`
	Email          string         `json:"email"`
	CommonName     string         `json:"commonName"`
	Messages       []string       `json:"messages"` // To report error or explanation i.e broken link in crd provider, or disabled link
}

UserEntry is the user definition provided by a given provider

func (*UserEntry) DeepCopy

func (in *UserEntry) DeepCopy() *UserEntry

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

func (*UserEntry) DeepCopyInto

func (in *UserEntry) DeepCopyInto(out *UserEntry)

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

Jump to

Keyboard shortcuts

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