Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertGRPCStatusCodeToHTTPCode(code codes.Code) int
- func CtxDeadline(ctx context.Context) (context.Context, context.CancelFunc)
- func ErrResponse(w http.ResponseWriter, err error)
- type Config
- type ErrObject
- type GithubFileInfo
- type Handler
- type JQQuery
- type NameDataTuple
- type NamedDirectory
- type RequestStatus
- type Server
Constants ¶
View Source
const ( RN_Preflight = "preflight" RN_HealthCheck = "healthCheck" RN_ListNamespaces = "listNamespaces" RN_AddNamespace = "addNamespace" RN_DeleteNamespace = "deleteNamespace" RN_NamespaceEvent = "namespaceEvent" RN_ListSecrets = "listSecrets" RN_CreateSecret = "createSecret" RN_DeleteSecret = "deleteSecret" RN_ListRegistries = "listRegistries" RN_CreateRegistry = "createRegistry" RN_DeleteRegistry = "deleteRegistry" RN_GetWorkflowMetrics = "getWorkflowMetrics" RN_ListWorkflows = "listWorkflows" RN_GetWorkflow = "getWorkflow" RN_UpdateWorkflow = "updateWorkflow" RN_ToggleWorkflow = "toggleWorkflow" RN_CreateWorkflow = "createWorkflow" RN_DeleteWorkflow = "deleteWorkflow" RN_DownloadWorkflow = "downloadWorkflow" RN_ExecuteWorkflow = "executeWorkflow" RN_ListWorkflowInstances = "listWorkflowInstances" RN_ListInstances = "listInstances" RN_GetInstance = "getInstance" RN_CancelInstance = "cancelInstance" RN_GetInstanceLogs = "getInstanceLogs" RN_ListActionTemplateFolders = "listActionTemplateFolders" RN_ListActionTemplates = "listActionTemplates" RN_GetActionTemplate = "getActionTemplate" RN_ListWorkflowTemplateFolders = "listWorkflowTemplateFolders" RN_ListWorkflowTemplates = "listWorkflowTemplates" RN_GetWorkflowTemplate = "getWorkflowTemplate" RN_ListWorkflowVariables = "listWorkflowVariables" RN_GetWorkflowVariable = "getWorkflowVariable" RN_SetWorkflowVariable = "setWorkflowVariable" RN_ListNamespaceVariables = "listNamespaceVariables" RN_GetNamespaceVariable = "getNamespaceVariable" RN_GetNamespaceLogs = "getNamespaceLogs" RN_SetNamespaceVariable = "setNamespaceVariable" RN_JQPlayground = "jqPlayground" )
RN = Route Name
View Source
const ( // GRPCCommandTimeout : timeout for grpc function calls GRPCCommandTimeout = 90 * time.Second )
View Source
const ( // GenericErrorCode - Reserved status code for generic non grpc errors GenericErrorCode codes.Code = 50 )
Variables ¶
View Source
var RouteNames = []string{ RN_Preflight, RN_ListNamespaces, RN_AddNamespace, RN_DeleteNamespace, RN_NamespaceEvent, RN_GetNamespaceLogs, RN_ListSecrets, RN_CreateSecret, RN_DeleteSecret, RN_ListRegistries, RN_CreateRegistry, RN_DeleteRegistry, RN_GetWorkflowMetrics, RN_ListWorkflows, RN_GetWorkflow, RN_UpdateWorkflow, RN_ToggleWorkflow, RN_CreateWorkflow, RN_DeleteWorkflow, RN_DownloadWorkflow, RN_ExecuteWorkflow, RN_ListWorkflowInstances, RN_ListInstances, RN_GetInstance, RN_CancelInstance, RN_GetInstanceLogs, RN_ListActionTemplateFolders, RN_ListActionTemplates, RN_GetActionTemplate, RN_ListWorkflowTemplateFolders, RN_ListWorkflowTemplates, RN_GetWorkflowTemplate, RN_ListWorkflowVariables, RN_GetWorkflowVariable, RN_SetWorkflowVariable, RN_ListNamespaceVariables, RN_GetNamespaceVariable, RN_SetNamespaceVariable, RN_JQPlayground, }
Functions ¶
func ConvertGRPCStatusCodeToHTTPCode ¶ added in v0.2.6
ConvertGRPCStatusCodeToHTTPCode - Convert Grpc Code errors to http response codes
func CtxDeadline ¶
CtxDeadline defines default request deadline
func ErrResponse ¶
func ErrResponse(w http.ResponseWriter, err error)
ErrResponse creates error based on grpc error
Types ¶
type Config ¶
type Config struct { Ingress struct { Endpoint string TLS bool } Server struct { Bind string } Templates struct { WorkflowTemplateDirectories []NamedDirectory ActionTemplateDirectories []NamedDirectory } }
Config ..
func ConfigFromEnv ¶
ConfigFromEnv reads API configuration from env variables
func ConfigFromFile ¶
ConfigFromFile reads API configuration from file
type ErrObject ¶
ErrObject for grpc
func GenerateErrObject ¶ added in v0.2.6
GenerateErrObject - Unwrap grpc errors into ErrorObject
type GithubFileInfo ¶
type GithubFileInfo struct { Name string `json:"name"` Path string `json:"path"` Sha string `json:"sha"` Size int `json:"size"` URL string `json:"url"` HTMLURL string `json:"html_url"` GitURL string `json:"git_url"` DownloadURL string `json:"download_url"` Type string `json:"type"` Links struct { Self string `json:"self"` Git string `json:"git"` HTML string `json:"html"` } `json:"_links"` }
GithubDirectoryInfo ..
type NameDataTuple ¶
type NamedDirectory ¶
type RequestStatus ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server ..
func (*Server) IngressClient ¶
func (s *Server) IngressClient() ingress.DirektivIngressClient
IngressClient returns client to backend
Click to show internal directories.
Click to hide internal directories.