solutions

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter func(Solution) bool

func FilterByStatusSlice

func FilterByStatusSlice(status []string) Filter

type JsonReader

type JsonReader struct{}

func NewJsonReader

func NewJsonReader() *JsonReader

func (*JsonReader) Read

func (j *JsonReader) Read(reader io.Reader) (Solution, error)

func (*JsonReader) ReadAll

func (j *JsonReader) ReadAll(reader io.Reader) ([]Solution, error)

type Metadata

type Metadata struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	UID       string `json:"uid"`
}

type Query

type Query struct {
	Query []string
}

func NewQuery

func NewQuery(options ...QueryOptions) *Query

func (*Query) BuildQuery

func (q *Query) BuildQuery() string

type QueryOptions

type QueryOptions func(*Query)

func OwnerQuery

func OwnerQuery(owner []string) QueryOptions

type Reader

type Reader interface {
	Read(io.Reader) (Solution, error)
	ReadAll(io.Reader) ([]Solution, error)
}

type Solution

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

type TextWriter

type TextWriter struct{}

func NewTextWriter

func NewTextWriter() *TextWriter

func (*TextWriter) Write

func (w *TextWriter) Write(out io.Writer, sol Solution) error

func (*TextWriter) WriteAll

func (w *TextWriter) WriteAll(out io.Writer, sol []Solution) error

func (*TextWriter) WriteFilter

func (w *TextWriter) WriteFilter(out io.Writer, sols []Solution, filter Filter) error

type Writer

type Writer interface {
	Write(io.Writer, Solution) error
	WriteAll(io.Writer, []Solution) error
	WriteFilter(io.Writer, []Solution, Filter) error
}

Jump to

Keyboard shortcuts

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