model

package
v0.0.0-...-61d19a0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFile

func LoadFile(path string) (string, error)

LoadFile : determines if the encountered string is

func LoadMapSlice

func LoadMapSlice(s yaml.MapSlice) (yaml.MapSlice, error)

LoadMapSlice : loads all values into a slice

func LoadSlice

func LoadSlice(s []interface{}) ([]interface{}, error)

LoadSlice : loads all values into a slice

func SaveConfig

func SaveConfig(c *Config) error

SaveConfig ...

Types

type BuildEvent

type BuildEvent struct {
	ID      string           `json:"id"`
	Name    string           `json:"name"`
	Subject string           `json:"_subject"`
	Changes []ComponentEvent `json:"changes"`
}

BuildEvent represents an event of type build from an SSE stream

type ComponentEvent

type ComponentEvent struct {
	ID         string           `json:"_component_id"`
	Subject    string           `json:"_subject"`
	Type       string           `json:"_component"`
	State      string           `json:"_state"`
	Action     string           `json:"_action"`
	Provider   string           `json:"_provider"`
	Name       string           `json:"name"`
	Error      string           `json:"error,omitempty"`
	Service    string           `json:"service,omitempty"`
	Components []ComponentEvent `json:"components,omitempty"`
}

ComponentEvent represents an event of type component from a SSE stream

type Config

type Config struct {
	URL          string `json:"url"`
	Token        string `json:"token"`
	User         string `json:"user"`
	Password     string `json:"-"`
	UserID       string `json:"userid"`
	Verification string `json:"verification_code"`
}

Config is the configuration struct for this app

func GetConfig

func GetConfig() *Config

GetConfig : Get config defined on the .ernest file

type Definition

type Definition struct {
	Name    string
	Project string
	// contains filtered or unexported fields
}

Definition ...

func (*Definition) Load

func (d *Definition) Load(data []byte) (err error)

Load the yaml

func (*Definition) LoadFileImports

func (d *Definition) LoadFileImports() error

LoadFileImports : loads any referenced files and maps them to the import definition

func (*Definition) Save

func (d *Definition) Save() ([]byte, error)

Save the definition as a byte slice

type Message

type Message struct {
	Subject string `json:"subject"`
	Body    string `json:"body"`
	Level   string `json:"level"`
}

Message represents an incomming websocket message

Jump to

Keyboard shortcuts

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