models

package
v0.0.0-...-c867f56 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SonarqubeService Type = iota // sonarqube
	JenkinsService               // jenkins

	Running State = iota // running
	Pending              // pending
	Stopped              // stopped
)

Variables

This section is empty.

Functions

func StateStrings

func StateStrings() []string

StateStrings returns a slice of all String values of the enum

func TypeStrings

func TypeStrings() []string

TypeStrings returns a slice of all String values of the enum

Types

type Configuration

type Configuration struct {
	UseCases []UseCaseConfiguration `json:"usecases"`
}

func (*Configuration) FromDB

func (c *Configuration) FromDB(dbc *db.Configuration)

func (*Configuration) ToDB

func (c *Configuration) ToDB() *db.Configuration

type Credential

type Credential struct {
	Username    string `json:"username"`
	Password    string `json:"password"`
	AccessToken string `json:"access_token"`
}

func (*Credential) FromDB

func (c *Credential) FromDB(dbc *db.Credential)

func (*Credential) ToDB

func (c *Credential) ToDB() *db.Credential

type Deployment

type Deployment struct {
	Canonical   string     `json:"canonical"`
	Instances   []Instance `json:"instances"`
	Type        Type       `json:"type"`
	CallbackURL string     `json:"callback_url"`
	CreatedAt   time.Time  `json:"created_at"`
}

func (*Deployment) FromDB

func (d *Deployment) FromDB(dbd *db.Deployment)

func (*Deployment) ToDB

func (d *Deployment) ToDB() *db.Deployment

type Instance

type Instance struct {
	URL             string     `json:"url"`
	State           State      `json:"state"`
	AdminCredential Credential `json:"admin_cred"`
	UserCredential  Credential `json:"user_cred"`
}

func (*Instance) FromDB

func (i *Instance) FromDB(dbi *db.Instance)

func (*Instance) ToDB

func (i *Instance) ToDB(dcan string) *db.Instance

type PluginInformation

type PluginInformation struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

func (*PluginInformation) FromDB

func (p *PluginInformation) FromDB(dbp *db.PluginInformation)

func (*PluginInformation) ToDB

type ServiceConfiguration

type ServiceConfiguration struct {
	Type    Type                `json:"type"`
	Version string              `json:"version"`
	Plugins []PluginInformation `json:"plugins"`
}

func (*ServiceConfiguration) FromDB

func (*ServiceConfiguration) ToDB

type State

type State uint

func StateString

func StateString(s string) (State, error)

StateString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func StateValues

func StateValues() []State

StateValues returns all values of the enum

func (State) IsAState

func (i State) IsAState() bool

IsAState returns "true" if the value is listed in the enum definition. "false" otherwise

func (State) String

func (i State) String() string

type Type

type Type uint

func TypeString

func TypeString(s string) (Type, error)

TypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func TypeValues

func TypeValues() []Type

TypeValues returns all values of the enum

func (Type) IsAType

func (i Type) IsAType() bool

IsAType returns "true" if the value is listed in the enum definition. "false" otherwise

func (Type) String

func (i Type) String() string

type UseCaseConfiguration

type UseCaseConfiguration struct {
	Name     string                 `json:"name"`
	Services []ServiceConfiguration `json:"services"`
}

func (*UseCaseConfiguration) FromDB

func (uc *UseCaseConfiguration) FromDB(dbuc *db.UseCaseConfiguration)

func (*UseCaseConfiguration) ToDB

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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