reservations

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: 4 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(TZReservation) bool

func FilterByStatus

func FilterByStatus(status string) Filter

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) (TZReservation, error)

func (*JsonReader) ReadAll

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

type OutputWriter

type OutputWriter interface {
	io.Writer
}

type Reader

type Reader interface {
	Read(io.Reader) (TZReservation, error)
	ReadAll(io.Reader) ([]TZReservation, error)
}
type ServiceLink struct {
	LinkType  string `json:"type"`
	Label     string
	Sensitive bool
	Url       string
}

type TZReservation

type TZReservation struct {
	Name           string
	ServiceLinks   []ServiceLink
	OpportunityId  []string
	ReservationId  string `json:"id"`
	CreatedAt      int
	Status         string
	ProvisionDate  string
	ProvisionUntil string
	CollectionId   string
	ExtendCount    int
	Description    string
}

type TextWriter

type TextWriter struct{}

func NewTextWriter

func NewTextWriter() *TextWriter

func (*TextWriter) Write

func (w *TextWriter) Write(out io.Writer, rez TZReservation) error

func (*TextWriter) WriteAll

func (w *TextWriter) WriteAll(out io.Writer, rez []TZReservation) error

func (*TextWriter) WriteFilter

func (w *TextWriter) WriteFilter(out io.Writer, rez []TZReservation, filter Filter) (int, error)

func (*TextWriter) WriteOne

func (w *TextWriter) WriteOne(out io.Writer, rez TZReservation) error

type Writer

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

Jump to

Keyboard shortcuts

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