cks

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

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

Go to latest
Published: Jan 8, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

cks package contains the core application business logic. It is named after the experiment app name `cobra-k8s-selectors`, aka `c-k-s`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CharacterAsFields

func CharacterAsFields(c swapi.Character) fields.Fields

CharacterAsFields transforms a Character struct into a field Set that implements the Fields interface.

func CharacterAsLabels

func CharacterAsLabels(c swapi.Character) labels.Labels

CharacterAsLabels transforms a Character struct into a label Set that implements the Labels interface.

func NewCks

func NewCks(r swapi.Port) *cks

Types

type ListOptions

type ListOptions struct {
	// LabelSelector specifies a selector to filter the list of returned
	// objects using a K8s-compatible label selector syntax.
	// Defaults to accepting everything.
	LabelSelector string

	// FieldSelector specifies a selector to filter the list of returned
	// objects using a K8s-compatible field selector syntax.
	// Defaults to accepting everything.
	FieldSelector string
}

ListOptions allow configuring a `list` call

type Port

type Port interface {
	List(options *ListOptions) ([]swapi.Character, error)
}

Jump to

Keyboard shortcuts

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