Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultAuth = Auth{ TTL: time.Second * 10, }
Default auth provider.
Functions ¶
func ConfigEnvOrDefault ¶
func MustGatherExec ¶
Types ¶
type Auth ¶
type Auth struct { // k8s API writer. Writer client.Writer // Cached token TTL. TTL time.Duration // contains filtered or unexported fields }
Authorized by k8s bearer token SAR. Token must have "*" on the cluster, like cluster-admin
type Gathering ¶
type Gathering struct { ID uint `gorm:"primarykey" json:"id"` CreatedAt time.Time `json:"created-at"` UpdatedAt time.Time `json:"updated-at"` AuthToken string `json:"-"` // Maybe use hash function to not store the real token CustomName string `gorm:"index" form:"custom-name" json:"custom-name"` Status string `json:"status"` // Expected values: new, inprogress, completed, error Image string `form:"image" json:"image"` ImageStream string `form:"image-stream" json:"image-stream"` NodeName string `form:"node-name" json:"node-name"` Command string `form:"command" json:"command"` SourceDir string `form:"source-dir" json:"source-dir"` Timeout string `form:"timeout" json:"timeout"` Server string `form:"server" json:"server"` ArchivePath string `json:"-"` // Not exposed via JSON API ArchiveSize uint `json:"archive-size"` ArchiveName string `json:"archive-name"` ExecOutput string `json:"exec-output"` // Fields without form:"<name>" cannot be set via API by bind }
Click to show internal directories.
Click to hide internal directories.