Documentation ¶
Index ¶
- Constants
- Variables
- func AddAuthHeaders(req *http.Request)
- func AddSSEAuthHeaders(client *sse.Client)
- func Fail(cmd *cobra.Command, s string, x ...interface{})
- func FormatLogEntry(data map[string]interface{}) string
- func GetAuth() string
- func GetConfigFilePath() (string, error)
- func GetLogs(cmd *cobra.Command, instance string, query string) (urlOutput string)
- func GetLogsSSE(ctx context.Context, printToConsole LoggerFunc, urlsse string) error
- func GetLogsV2(ctx context.Context, printToConsole LoggerFunc, urlGet string) error
- func GetMaxSize() int64
- func GetNamespace() string
- func GetProjectFileLocation() string
- func GetRelativePath(configPath, targpath string) (string, error)
- func GetTLSConfig() *tls.Config
- func InitConfiguration(cmd *cobra.Command, args []string)
- func InitConfigurationAndProject(cmd *cobra.Command, args []string)
- func InitWD() error
- func LoadProfileConfig() error
- func ProjectFolder() (string, error)
- func SafeLoadFile(filePath string) (*bytes.Buffer, error)
- func SafeLoadStdIn() (*bytes.Buffer, error)
- type Configuration
- type FilterQueryInstance
- type InstanceResponse
- type LogResponse
- type LoggerFunc
- type ProfileConfig
Constants ¶
View Source
const ( DefaultProfileConfigName = ".direktiv.profile.yaml" DefaultProfileConfigPath = ".config/direktiv/" )
View Source
const ToolName = "direktivctl"
Variables ¶
View Source
var ( UrlPrefix string UrlPrefixV2 string )
View Source
var RootCmd = &cobra.Command{ Use: ToolName, }
Functions ¶
func AddAuthHeaders ¶
func AddSSEAuthHeaders ¶
func FormatLogEntry ¶ added in v0.8.4
func GetConfigFilePath ¶ added in v0.8.0
func GetLogsSSE ¶ added in v0.8.4
func GetLogsSSE(ctx context.Context, printToConsole LoggerFunc, urlsse string) error
func GetLogsV2 ¶ added in v0.8.4
func GetLogsV2(ctx context.Context, printToConsole LoggerFunc, urlGet string) error
func GetMaxSize ¶ added in v0.8.0
func GetMaxSize() int64
func GetNamespace ¶
func GetNamespace() string
func GetProjectFileLocation ¶ added in v0.8.0
func GetProjectFileLocation() string
func GetRelativePath ¶
func GetTLSConfig ¶
func InitConfiguration ¶ added in v0.8.0
func InitConfigurationAndProject ¶ added in v0.8.0
func LoadProfileConfig ¶ added in v0.8.0
func LoadProfileConfig() error
func ProjectFolder ¶
func SafeLoadStdIn ¶
Types ¶
type Configuration ¶ added in v0.8.0
type Configuration struct { project.Config `mapstructure:",squash" yaml:",inline"` Profiles map[string]ProfileConfig `mapstructure:"profiles" yaml:"profiles,flow"` }
var ( Config Configuration Globbers []glob.Glob )
type FilterQueryInstance ¶ added in v0.8.0
func (FilterQueryInstance) Query ¶ added in v0.8.0
func (fq FilterQueryInstance) Query() string
type InstanceResponse ¶ added in v0.8.0
type InstanceResponse struct { Namespace string `json:"namespace"` Instance struct { CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` ID string `json:"id"` As string `json:"as"` Status string `json:"status"` ErrorCode string `json:"errorCode"` ErrorMessage string `json:"errorMessage"` } `json:"instance"` InvokedBy string `json:"invokedBy"` Flow []string `json:"flow"` Workflow struct { Path string `json:"path"` Name string `json:"name"` Parent string `json:"parent"` } `json:"workflow"` }
type LogResponse ¶ added in v0.8.0
type LogResponse struct { PageInfo struct { TotalCount int `json:"total"` Limit int `json:"limit"` Offset int `json:"offset"` } `json:"pageInfo"` Results []struct { T time.Time `json:"t"` Msg string `json:"msg"` Level string `json:"level"` Tags map[string]string `json:"tags"` } `json:"results"` Namespace string `json:"namespace"` Instance string `json:"instance"` }
type LoggerFunc ¶ added in v0.8.4
type LoggerFunc func(msg string)
Click to show internal directories.
Click to hide internal directories.