models

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigToMap

func ConfigToMap(in interface{}, tag string) (map[string]string, error)

ConfigToMap converts a config struct to a map using the m tags

func Hash

func Hash(val string) string

func NewUUID

func NewUUID() (string, error)

Types

type ChartDto

type ChartDto struct {
	Labels []string `json:"labels"`
	Values []int64  `json:"values"`
}

type ClusterHealthCheck added in v0.9.0

type ClusterHealthCheck struct {
	Id          string    `bson:"_id,omitempty" json:"id"`
	Status      string    `bson:"status" json:"status"`
	Output      string    `bson:"output" json:"output"`
	ServiceName string    `bson:"service_name" json:"service_name"`
	HostName    string    `bson:"host_name" json:"host_name"`
	Collected   time.Time `bson:"collected" json:"collected"`
	Since       time.Time `bson:"since" json:"since"`
	Environment string    `bson:"environment" json:"environment"`
}

type ClusterHealthCheckLog added in v0.9.0

type ClusterHealthCheckLog struct {
	Id          string    `bson:"_id,omitempty" json:"id"`
	CheckId     string    `bson:"check_id,omitempty" json:"check_id"`
	Status      string    `bson:"status" json:"status"`
	Output      string    `bson:"output" json:"output"`
	ServiceName string    `bson:"service_name" json:"service_name"`
	HostName    string    `bson:"host_name" json:"host_name"`
	Begin       time.Time `bson:"begin" json:"begin"`
	End         time.Time `bson:"end" json:"end"`
	Timestamp   time.Time `bson:"timestamp" json:"timestamp"`
	Duration    int64     `bson:"duration" json:"duration"`
	Environment string    `bson:"environment" json:"environment"`
}

func NewClusterHealthCheckLog added in v0.9.0

func NewClusterHealthCheckLog(check ClusterHealthCheck, begin time.Time, end time.Time) ClusterHealthCheckLog

type ClusterPayload added in v0.9.0

type ClusterPayload struct {
	HealthCheck ClusterHealthCheck `json:"health_check"`
	Environment string             `json:"environment"`
}

type ConsulHealthCheck added in v0.0.2

type ConsulHealthCheck struct {
	Id          string    `bson:"_id,omitempty" json:"id"`
	HostId      string    `bson:"host_id" json:"host_id"`
	HostName    string    `bson:"host_name" json:"host_name"`
	Node        string    `bson:"node" json:"node"`
	CheckID     string    `bson:"check_id" json:"check_id"`
	Name        string    `bson:"name" json:"name"`
	Status      string    `bson:"status" json:"status"`
	Notes       string    `bson:"notes" json:"notes"`
	Output      string    `bson:"output" json:"output"`
	ServiceID   string    `bson:"service_id" json:"service_id"`
	ServiceName string    `bson:"service_name" json:"service_name"`
	Collected   time.Time `bson:"collected" json:"collected"`
	Since       time.Time `bson:"since" json:"since"`
	Environment string    `bson:"environment" json:"environment"`
}

type ConsulHealthCheckLog added in v0.2.0

type ConsulHealthCheckLog struct {
	Id          string    `bson:"_id,omitempty" json:"id"`
	CheckId     string    `bson:"check_id,omitempty" json:"check_id"`
	HostId      string    `bson:"host_id" json:"host_id"`
	HostName    string    `bson:"host_name" json:"host_name"`
	Node        string    `bson:"node" json:"node"`
	Name        string    `bson:"name" json:"name"`
	Status      string    `bson:"status" json:"status"`
	Notes       string    `bson:"notes" json:"notes"`
	Output      string    `bson:"output" json:"output"`
	ServiceID   string    `bson:"service_id" json:"service_id"`
	ServiceName string    `bson:"service_name" json:"service_name"`
	Begin       time.Time `bson:"begin" json:"begin"`
	End         time.Time `bson:"end" json:"end"`
	Timestamp   time.Time `bson:"timestamp" json:"timestamp"`
	Duration    int64     `bson:"duration" json:"duration"`
	Environment string    `bson:"environment" json:"environment"`
}

func NewConsulHealthCheckLog added in v0.2.0

func NewConsulHealthCheckLog(check ConsulHealthCheck, begin time.Time, end time.Time) ConsulHealthCheckLog

type ConsulPayload added in v0.0.2

type ConsulPayload struct {
	HealthChecks []ConsulHealthCheck `json:"health_checks"`
	Environment  string              `json:"environment"`
}

type Deployment added in v0.3.0

type Deployment struct {
	Id          string            `bson:"_id,omitempty" json:"id"`
	ReleaseId   string            `bson:"release_id,omitempty" json:"release_id"`
	TicketId    string            `bson:"ticket_id,omitempty" json:"ticket_id"`
	Status      string            `bson:"status" json:"status"`
	ServiceName string            `bson:"service_name" json:"service_name"`
	HostName    string            `bson:"host_name" json:"host_name"`
	Environment string            `bson:"environment" json:"environment"`
	Timestamp   time.Time         `bson:"timestamp" json:"timestamp"`
	Image       string            `bson:"image" json:"image"`
	Command     string            `bson:"command" json:"command"`
	Labels      map[string]string `bson:"labels" json:"labels"`
	Env         []string          `bson:"env" json:"env"`
	Log         string            `bson:"log" json:"log"`
}

type DockerContainer

type DockerContainer struct {
	Id            string            `bson:"_id,omitempty" json:"id"`
	HostId        string            `bson:"host_id" json:"host_id"`
	HostName      string            `bson:"host_name" json:"host_name"`
	Port          string            `bson:"port" json:"port"`
	Image         string            `bson:"image" json:"image"`
	Command       string            `bson:"command" json:"command"`
	Labels        map[string]string `bson:"labels" json:"labels"`
	State         string            `bson:"state" json:"state"`
	Status        string            `bson:"status" json:"status"`
	Created       time.Time         `bson:"created" json:"created"`
	Path          string            `bson:"path" json:"path"`
	Args          []string          `bson:"args" json:"args"`
	Name          string            `bson:"name" json:"name"`
	RestartCount  int               `bson:"restart_count" json:"restart_count"`
	Env           []string          `bson:"env" json:"env"`
	PortBindings  map[string]string `bson:"port_bindings" json:"port_bindings"`
	NetworkMode   string            `bson:"network_mode" json:"network_mode"`
	RestartPolicy string            `bson:"restart_policy" json:"restart_policy"`
	StartedAt     time.Time         `bson:"started_at" json:"started_at"`
	FinishedAt    time.Time         `bson:"finished_at" json:"finished_at"`
	ExitCode      int               `bson:"exit_code" json:"exit_code"`
	Error         string            `bson:"error" json:"error"`
	Collected     time.Time         `bson:"collected" json:"collected"`
	Environment   string            `bson:"environment" json:"environment"`
}

type DockerHost

type DockerHost struct {
	Id                 string    `bson:"_id,omitempty" json:"id"`
	Containers         int       `bson:"containers" json:"containers"`
	ContainersRunning  int       `bson:"containers_running" json:"containers_running"`
	ContainersPaused   int       `bson:"containers_paused" json:"containers_paused"`
	ContainersStopped  int       `bson:"containers_stopped" json:"containers_stopped"`
	Images             int       `bson:"images" json:"images"`
	Driver             string    `bson:"driver" json:"driver"`
	SystemTime         string    `bson:"system_time" json:"system_time"`
	LoggingDriver      string    `bson:"logging_driver" json:"logging_driver"`
	CgroupDriver       string    `bson:"cgroup_driver" json:"cgroup_driver"`
	NEventsListener    int       `bson:"n_events_listener" json:"n_events_listener"`
	KernelVersion      string    `bson:"kernel_version" json:"kernel_version"`
	OperatingSystem    string    `bson:"operating_system" json:"operating_system"`
	OSType             string    `bson:"os_type" json:"os_type"`
	Architecture       string    `bson:"architecture" json:"architecture"`
	IndexServerAddress string    `bson:"index_server_address" json:"index_server_address"`
	NCPU               int       `bson:"ncpu" json:"ncpu"`
	MemTotal           int64     `bson:"mem_total" json:"mem_total"`
	DockerRootDir      string    `bson:"docker_root_dir" json:"docker_root_dir"`
	HTTPProxy          string    `bson:"http_proxy" json:"http_proxy"`
	HTTPSProxy         string    `bson:"https_proxy" json:"https_proxy"`
	NoProxy            string    `bson:"no_proxy" json:"no_proxy"`
	Name               string    `bson:"name" json:"name"`
	Labels             []string  `bson:"labels" json:"labels"`
	ExperimentalBuild  bool      `bson:"experimental_build" json:"experimental_build"`
	ServerVersion      string    `bson:"server_version" json:"server_version"`
	ClusterStore       string    `bson:"cluster_store" json:"cluster_store"`
	ClusterAdvertise   string    `bson:"cluster_advertise" json:"cluster_advertise"`
	DefaultRuntime     string    `bson:"default_runtime" json:"default_runtime"`
	LiveRestoreEnabled bool      `bson:"live_restore_enabled" json:"live_restore_enabled"`
	Registries         []string  `bson:"registries" json:"registries"`
	Collected          time.Time `bson:"collected" json:"collected"`
	Environment        string    `bson:"environment" json:"environment"`
}

type DockerPayload

type DockerPayload struct {
	Host       DockerHost        `json:"host"`
	Containers []DockerContainer `json:"containers"`
}

type EnvironmentDto

type EnvironmentDto struct {
	Host        DockerHost        `json:"host"`
	Containers  []DockerContainer `json:"containers"`
	Deployments ChartDto          `json:"deployments"`
}

type EnvironmentStats

type EnvironmentStats struct {
	Environment       string `json:"environment" bson:"_id"`
	Hosts             int    `json:"hosts" bson:"hosts"`
	ContainersRunning int    `json:"containers_running" bson:"containers_running"`
	NCPU              int    `json:"ncpu" bson:"ncpu"`
	MemTotal          int64  `json:"mem_total" bson:"mem_total"`
}

type HealthCheckStats added in v0.2.0

type HealthCheckStats struct {
	Status   string `json:"status" bson:"_id"`
	Count    int    `json:"count" bson:"count"`
	Duration int64  `json:"duration" bson:"duration"`
}

type Release added in v0.3.0

type Release struct {
	Id           string    `bson:"_id,omitempty" json:"id"`
	TicketId     string    `bson:"ticket_id,omitempty" json:"ticket_id"`
	Name         string    `bson:"name" json:"name"`
	Begin        time.Time `bson:"begin" json:"begin"`
	End          time.Time `bson:"end" json:"end"`
	Deployments  int       `bson:"deployments" json:"deployments"`
	Environments string    `bson:"environments" json:"environments"`
	Log          string    `bson:"log" json:"log"`
}

type ReleasePlan added in v0.4.0

type ReleasePlan struct {
	Id        string    `bson:"_id,omitempty" json:"id"`
	TicketId  string    `bson:"ticket_id,omitempty" json:"ticket_id"`
	Name      string    `bson:"name" json:"name"`
	Timestamp time.Time `bson:"timestamp" json:"timestamp"`
}

type ReleaseStep added in v0.4.0

type ReleaseStep struct {
	Id          string    `bson:"_id,omitempty" json:"id"`
	ReleaseId   string    `bson:"releaseplan_id,omitempty" json:"releaseplan_id"`
	TicketId    string    `bson:"ticket_id,omitempty" json:"ticket_id"`
	Order       int       `bson:"order" json:"order"`
	Environment string    `bson:"environment" json:"environment"`
	Command     string    `bson:"command" json:"command"`
	Status      string    `bson:"status" json:"status"`
	Log         string    `bson:"log" json:"log"`
	Begin       time.Time `bson:"begin" json:"begin"`
	End         time.Time `bson:"end" json:"end"`
}

type SyrosService

type SyrosService struct {
	Id          string            `bson:"_id,omitempty" json:"id"`
	Hostname    string            `bson:"hostname" json:"hostname"`
	Type        string            `bson:"type" json:"type"`
	Config      map[string]string `bson:"config" json:"config"`
	Environment string            `bson:"environment" json:"environment"`
	Collected   time.Time         `bson:"collected" json:"collected"`
}

type VSphereDatastore added in v0.5.0

type VSphereDatastore struct {
	Id          string    `bson:"_id,omitempty" json:"id"`
	Name        string    `bson:"name" json:"name"`
	Type        string    `bson:"type" json:"type"`
	Capacity    int64     `bson:"capacity" json:"capacity"`
	Free        int64     `bson:"free" json:"free"`
	Collected   time.Time `bson:"collected" json:"collected"`
	Environment string    `bson:"environment" json:"environment"`
	VMs         int       `bson:"vms" json:"vms"`
}

type VSphereHost added in v0.5.0

type VSphereHost struct {
	Id          string     `bson:"_id,omitempty" json:"id"`
	Name        string     `bson:"name" json:"name"`
	Cluster     string     `bson:"cluster" json:"cluster"`
	PowerState  string     `bson:"power_state" json:"power_state"`
	BootTime    *time.Time `bson:"boot_time" json:"boot_time"`
	NCPU        int        `bson:"ncpu" json:"ncpu"`
	Memory      int64      `bson:"memory" json:"memory"`
	Collected   time.Time  `bson:"collected" json:"collected"`
	Environment string     `bson:"environment" json:"environment"`
	VMs         int        `bson:"vms" json:"vms"`
}

type VSpherePayload added in v0.5.0

type VSpherePayload struct {
	Hosts      []VSphereHost      `json:"hosts"`
	DataStores []VSphereDatastore `json:"data_stores"`
	VMs        []VSphereVM        `json:"vms"`
}

type VSphereVM added in v0.5.0

type VSphereVM struct {
	Id            string     `bson:"_id,omitempty" json:"id"`
	HostId        string     `bson:"host_id" json:"host_id"`
	HostName      string     `bson:"host_name" json:"host_name"`
	Cluster       string     `bson:"cluster" json:"cluster"`
	DatastoreId   string     `bson:"datastore_id" json:"datastore_id"`
	DatastoreName string     `bson:"datastore_name" json:"datastore_name"`
	Name          string     `bson:"name" json:"name"`
	PowerState    string     `bson:"power_state" json:"power_state"`
	BootTime      *time.Time `bson:"boot_time" json:"boot_time"`
	NCPU          int        `bson:"ncpu" json:"ncpu"`
	Memory        int64      `bson:"memory" json:"memory"`
	Storage       int64      `bson:"storage" json:"storage"`
	IP            string     `json:"ip"`
	Collected     time.Time  `bson:"collected" json:"collected"`
	Environment   string     `bson:"environment" json:"environment"`
}

Jump to

Keyboard shortcuts

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