Documentation ¶
Index ¶
- func GetIDForRegex(id string) string
- func GetShortID(id string) string
- func GetTargetParentByID(id string) string
- type AWSJobDefinition
- type AuthRequest
- type DockerJobDefinition
- type Job
- type K8SJobDefinition
- type Monitor
- type MonitorJobDefinition
- type MonitorRef
- type Permissions
- type Role
- type RoleUpdateRequest
- type Scheduler
- type ShellJobDefinition
- type Target
- type TargetList
- type TargetPatch
- type TargetRef
- type User
- type UserToken
- type UserTokenRequest
- type UserUpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIDForRegex ¶
GetIDForRegex escapes special chars in the id for regex usage.
func GetTargetParentByID ¶
GetTargetParentByID obtains the parent ID of a target given its ID
Types ¶
type AWSJobDefinition ¶
type AWSJobDefinition struct { LambdaArn string `json:"lambdaArn,omitempty" bson:",omitempty" yaml:"lambda_arn"` Event string `json:"event,omitempty" bson:",omitempty" yaml:"event"` }
AWSServerlessDefinition is an AWS Lambda Serverless definition
type AuthRequest ¶
type DockerJobDefinition ¶
type DockerJobDefinition struct { Image string `json:"image,omitempty" bson:",omitempty" yaml:"image"` Command string `json:"command,omitempty" bson:",omitempty" yaml:"command"` Env map[string]string `json:"env,omitempty" bson:",omitempty" yaml:"env"` Volumes map[string]string `json:"volumes,omitempty" bson:",omitempty" yaml:"volumes"` }
DockerDefinition is a Docker task definition
type K8SJobDefinition ¶
type K8SJobDefinition struct {
Pod *DockerJobDefinition `json:"pod,omitempty" bson:",omitempty" yaml:"pod"`
}
K8SDefinition is a Kubernetes task definition
type Monitor ¶
type Monitor struct { ID string `json:"id" binding:"required" yaml:"id"` Label string `json:"label" binding:"required" yaml:"label"` Schedule string `json:"schedule" binding:"required" yaml:"schedule"` Description string `json:"description,omitempty" bson:",omitempty" yaml:"description"` Definition *MonitorJobDefinition `json:"definition" binding:"required" yaml:"definition"` Permissions `yaml:",inline"` }
Monitor is a monitor definition to be assigned to targets
type MonitorJobDefinition ¶
type MonitorJobDefinition struct { Docker *DockerJobDefinition `json:"docker,omitempty" bson:",omitempty" yaml:"docker"` K8S *K8SJobDefinition `json:"k8s,omitempty" bson:",omitempty" yaml:"k8s"` AWS *AWSJobDefinition `json:"aws,omitempty" bson:",omitempty" yaml:"aws"` Shell *ShellJobDefinition `json:"shell,omitempty" bson:",omitempty" yaml:"shell"` }
MonitorJobDefinition is a definition of a monitor
type MonitorRef ¶
type MonitorRef struct { MonitorID string `json:"monitorId,omitempty" bson:"monitorId" yaml:"monitorId"` Params map[string]string `json:"params,omitempty" bson:",omitempty" yaml:"params,omitempty"` }
MonitorRef is a reference to an existing monitor
type Permissions ¶
type Permissions struct { Owners []string `json:"owners" yaml:"owners"` Readers []string `json:"readers" yaml:"readers"` Writers []string `json:"writers" yaml:"writers"` CreatedAt time.Time `json:"createdAt" bson:"createdAt" time_format:"unix"` UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt" time_format:"unix"` }
Permissions for all objects
type Role ¶
type Role struct { Name string `json:"name" yaml:"name" binding:"required"` Description string `json:"description" yaml:"description" binding:"required"` Permissions `yaml:",inline"` }
type RoleUpdateRequest ¶
type RoleUpdateRequest struct { UsersAdd []string `json:"usersAdd,omitempty" yaml:"usersAdd,omitempty"` UsersRemove []string `json:"usersRemove,omitempty" yaml:"usersRemove,omitempty"` Permissions }
type ShellJobDefinition ¶
type ShellJobDefinition struct { Command string `json:"command,omitempty" bson:",omitempty" yaml:"command"` Executable string `json:"executable,omitempty" bson:",omitempty" yaml:"executable"` Env map[string]string `json:"env,omitempty" bson:",omitempty" yaml:"env"` }
ShellDefinition is a Shell command definition
type Target ¶
type Target struct { ID string `json:"id" yaml:"id" binding:"required"` Description string `json:"description" yaml:"description" binding:"required"` URL string `json:"url,omitempty" yaml:"url,omitempty" bson:",omitempty"` Status int `json:"status" yaml:"status"` StatusDescription string `json:"statusDescription,omitempty" yaml:"statusDescription,omitempty" bson:"statusDescription,omitempty"` Critical bool `json:"critical" yaml:"critical"` Monitor *MonitorRef `json:"monitor,omitempty" bson:",omitempty"` Children []TargetRef `json:"children,omitempty" yaml:"children,omitempty" bson:",omitempty"` ChildrenRef []string `json:"childrenRef,omitempty" bson:",omitempty"` Permissions `yaml:",inline"` }
Target full object
type TargetList ¶
type TargetList []*Target
TargetList for sorting targets by ID
func (TargetList) Len ¶
func (s TargetList) Len() int
func (TargetList) Less ¶
func (s TargetList) Less(i, j int) bool
func (TargetList) Swap ¶
func (s TargetList) Swap(i, j int)
type TargetPatch ¶
type TargetPatch struct { Status int `json:"status" binding:"required"` StatusDescription string `json:"statusDescription"` }
TargetPatch represents the fields that can be patched
type UserTokenRequest ¶
type UserUpdateRequest ¶
type UserUpdateRequest struct { FullName string `json:"fullName,omitempty" yaml:"fullName,omitempty"` OldPassword string `json:"oldPassword,omitempty" yaml:"fullName,omitempty"` NewPassword string `json:"newPassword,omitempty" yaml:"password,omitempty"` Permissions }
Click to show internal directories.
Click to hide internal directories.