techzone

package
v0.1.29 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultOutputFormat = "text"

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type EnvironmentServiceClient

type EnvironmentServiceClient interface {
	Get(id string) (*Environment, error)
	GetAll(f Filter) ([]Environment, error)
}

EnvironmentServiceClient the client API for EnvironmentService service.

type EnvironmentWebServiceClient

type EnvironmentWebServiceClient struct {
	BaseURL string
	Token   string
}

func (*EnvironmentWebServiceClient) Get

Get

func (*EnvironmentWebServiceClient) GetAll

GetAll

type Filter

type Filter func(Reservation) bool

func FilterByStatus

func FilterByStatus(status string) Filter

func FilterByStatusSlice

func FilterByStatusSlice(status []string) Filter

func NoFilter

func NoFilter() Filter

type JsonReader

type JsonReader struct{}

func NewJsonReader

func NewJsonReader() *JsonReader

func (*JsonReader) Read

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

func (*JsonReader) ReadAll

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

type JsonReservationWriter

type JsonReservationWriter struct{}

func (*JsonReservationWriter) WriteMany

func (j *JsonReservationWriter) WriteMany(w io.Writer, val interface{}) error

func (*JsonReservationWriter) WriteOne

func (j *JsonReservationWriter) WriteOne(w io.Writer, val interface{}) error

type ModelWriter

type ModelWriter interface {
	WriteOne(w io.Writer, val interface{}) error
	WriteMany(w io.Writer, val interface{}) error
}

func NewModelWriter

func NewModelWriter(forType string, format string) ModelWriter

type Reader

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

type RegisteredModelWriters

type RegisteredModelWriters struct {
	// contains filtered or unexported fields
}

func (*RegisteredModelWriters) Load

func (w *RegisteredModelWriters) Load(forType string, format string) ModelWriter

func (*RegisteredModelWriters) Register

func (w *RegisteredModelWriters) Register(forType string, format string, writer ModelWriter)

type Reservation

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

type ReservationServiceClient

type ReservationServiceClient interface {
	Get(id string) (*Reservation, error)
	GetAll(f Filter) ([]Reservation, error)
}

type ReservationWebServiceClient

type ReservationWebServiceClient struct {
	BaseURL string
	Token   string
}

func (*ReservationWebServiceClient) Get

Get

func (*ReservationWebServiceClient) GetAll

GetAll

type ServiceLink struct {
	LinkType  string `json:"type"`
	Label     string
	Sensitive bool
	// Fixed bug that this looks like a string, but only sometimes. It can be a complex JSON object.
	Data interface{} `json:"Url"`
}

type TextReservationWriter

type TextReservationWriter struct{}

func (*TextReservationWriter) WriteMany

func (t *TextReservationWriter) WriteMany(w io.Writer, val interface{}) error

func (*TextReservationWriter) WriteOne

func (t *TextReservationWriter) WriteOne(w io.Writer, val interface{}) error

type WriterKey

type WriterKey struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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