api

package
Version: v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package classification Direktiv API.

Direktiv Open API Specification Direktiv Documentation can be found at https://docs.direktiv.io/

Terms Of Service:

Schemes: http, https
Host: localhost
Version: 1.0.0
Contact: info@direktiv.io

Consumes:
- application/json

Produces:
- application/json

Security:
- api_key:

SecurityDefinitions:
api_key:
     type: apiKey
     name: KEY
     in: header

swagger:meta

Index

Constants

View Source
const (
	RN_Preflight            = "preflight"
	RN_ListNamespaces       = "listNamespaces"
	RN_AddNamespace         = "addNamespace"
	RN_GetNamespaceConfig   = "getNamespaceConfiguration"
	RN_SetNamespaceConfig   = "setNamespaceConfiguration"
	RN_DeleteNamespace      = "deleteNamespace"
	RN_GetNode              = "getNode"
	RN_CreateDirectory      = "createDirectory"
	RN_CreateWorkflow       = "createWorkflow"
	RN_UpdateWorkflow       = "updateWorkflow"
	RN_SaveWorkflow         = "saveWorkflow"
	RN_DiscardWorkflow      = "discardWorkflow"
	RN_DeleteNode           = "deleteNode"
	RN_RenameNode           = "renameNode"
	RN_GetWorkflowTags      = "getWorkflowTags"
	RN_GetWorkflowRevisions = "getWorkflowRevisions"
	RN_GetWorkflowRefs      = "getWorkflowRefs"
	RN_DeleteRevision       = "deleteRevision"
	RN_Tag                  = "tag"
	RN_Untag                = "untag"
	RN_Retag                = "retag"
	RN_GetWorkflowRouter    = "getWorkflowRouter"
	RN_EditWorkflowRouter   = "editWorkflowRouter"
	RN_ValidateRef          = "validateRef"
	RN_ValidateRouter       = "validateRouter"
	RN_NamespaceEvent       = "namespaceEvent"
	RN_ListSecrets          = "listSecrets"
	RN_CreateSecret         = "createSecret"
	RN_DeleteSecret         = "deleteSecret"
	RN_ListRegistries       = "listRegistries"
	RN_CreateRegistry       = "createRegistry"
	RN_DeleteRegistry       = "deleteRegistry"
	RN_GetNamespaceMetrics  = "getNamespaceMetrics"
	RN_GetWorkflowMetrics   = "getWorkflowMetrics"
	// RN_ListWorkflows                = "listWorkflows"
	// RN_GetWorkflow                  = "getWorkflow"
	// RN_ToggleWorkflow               = "toggleWorkflow"
	// RN_DeleteWorkflow               = "deleteWorkflow"
	// RN_DownloadWorkflow             = "downloadWorkflow"
	RN_ExecuteWorkflow = "executeWorkflow"
	// RN_ListWorkflowInstances        = "listWorkflowInstances"
	RN_ListInstances        = "listInstances"
	RN_GetInstance          = "getInstance"
	RN_CancelInstance       = "cancelInstance"
	RN_DeleteNodeAttributes = "deleteNodeAttributes"
	RN_CreateNodeAttributes = "createNodeAttributes"
	// RN_ListActionTemplateFolders    = "listActionTemplateFolders"
	// RN_ListActionTemplates          = "listActionTemplates"
	// RN_GetActionTemplate            = "getActionTemplate"
	// RN_ListWorkflowTemplateFolders  = "listWorkflowTemplateFolders"
	// RN_ListWorkflowTemplates        = "listWorkflowTemplates"
	// RN_GetWorkflowTemplate          = "getWorkflowTemplate"
	RN_ListInstanceVariables  = "listInstanceVariables"
	RN_GetInstanceVariable    = "getInstanceVariable"
	RN_SetInstanceVariable    = "setInstanceVariable"
	RN_ListWorkflowVariables  = "listWorkflowVariables"
	RN_GetWorkflowVariable    = "getWorkflowVariable"
	RN_SetWorkflowVariable    = "setWorkflowVariable"
	RN_ListNamespaceVariables = "listNamespaceVariables"
	RN_GetNamespaceVariable   = "getNamespaceVariable"
	RN_GetServerLogs          = "getServerLogs"
	RN_GetNamespaceLogs       = "getNamespaceLogs"
	RN_GetWorkflowLogs        = "getWorkflowLogs"
	RN_GetInstanceLogs        = "getInstanceLogs"
	RN_SetNamespaceVariable   = "setNamespaceVariable"
	RN_JQPlayground           = "jqPlayground"
	RN_Version                = "version"
	RN_ListServices           = "listServices"
	RN_ListNamespaceServices  = "listNamespacesServices"
	RN_WatchServices          = "watchServices"
	// RN_WatchInstanceServices        = "watchInstanceServices"
	// RN_WatchNamespaceServices       = "watchNamespaceServices"
	RN_WatchRevisions = "watchRevisions"
	// RN_WatchNamespaceRevisions      = "watchNamespaceRevisions"
	RN_WatchPods            = "watchPods"
	RN_WatchLogs            = "watchLogs"
	RN_ListPods             = "listPods"
	RN_DeleteServices       = "deleteServices"
	RN_GetService           = "getService"
	RN_CreateService        = "createService"
	RN_UpdateService        = "updateService"
	RN_UpdateServiceTraffic = "updateServiceTraffic"
	RN_DeleteService        = "deleteService"

	RN_ListNamespacePods             = "listNamespacePods"
	RN_CreateNamespaceService        = "createNamespaceService"
	RN_DeleteNamespaceServices       = "deleteNamespaceService"
	RN_GetNamespaceService           = "getNamespaceService"
	RN_UpdateNamespaceService        = "updateNamespaceService"
	RN_UpdateNamespaceServiceTraffic = "updateNamespaceServiceTraffic"
	RN_DeleteNamespaceRevision       = "deleteNamespaceRevision"

	RN_ListWorkflowServices = "listWorkflowServices"
	RN_ListWorkflowPods     = "listWorkflowPods"
)

RN = Route Name

View Source
const (

	// GenericErrorCode - Reserved status code for generic non grpc errors
	GenericErrorCode codes.Code = 50
)

Variables

This section is empty.

Functions

func ConvertGRPCStatusCodeToHTTPCode added in v0.2.6

func ConvertGRPCStatusCodeToHTTPCode(code codes.Code) int

ConvertGRPCStatusCodeToHTTPCode - Convert Grpc Code errors to http response codes

func GetInodePath added in v0.5.4

func GetInodePath(path string) string

Types

type ErrObject

type ErrObject struct {
	Code    codes.Code
	Message string
}

ErrObject for grpc

func GenerateErrObject added in v0.2.6

func GenerateErrObject(err error) *ErrObject

GenerateErrObject - Unwrap grpc errors into ErrorObject

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server struct for API server

func NewServer

func NewServer(l *zap.SugaredLogger) (*Server, error)

NewServer return new API server

func (*Server) GetRouter added in v0.5.0

func (s *Server) GetRouter() *mux.Router

GetRouter is a getter for s.router

func (*Server) Start

func (s *Server) Start() error

Start starts API server

Jump to

Keyboard shortcuts

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