api

package
v0.0.0-...-cb1a7a4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModelReadError

func ModelReadError(err error) errors.Error

func ModelWriteError

func ModelWriteError(err error) errors.Error

func NewHandler

func NewHandler(auth middleware.Authenticator, opts ...ServerOption) http.Handler

func WriteObjectWithStatus

func WriteObjectWithStatus(ctx context.Context, w http.ResponseWriter, status int, b []byte)

Types

type ActionStatusProcessState

type ActionStatusProcessState struct {
	ExitCode  int       `json:"exit_code"`
	Timestamp time.Time `json:"timestamp"`
}

type ActionStatusWhenCondition

type ActionStatusWhenCondition struct {
	Timestamp           time.Time                 `json:"timestamp"`
	WhenConditionStatus model.WhenConditionStatus `json:"when_condition_status"`
}

type GetConditionsResponseEnvelope

type GetConditionsResponseEnvelope struct {
	Resolved bool   `json:"resolved"`
	Success  bool   `json:"success"`
	Message  string `json:"message"`
}

type GetOutputResponseEnvelope

type GetOutputResponseEnvelope struct {
	TaskName string                    `json:"task_name"`
	Key      string                    `json:"key"`
	Value    transfer.JSONInterface    `json:"value"`
	Metadata *model.StepOutputMetadata `json:"metadata"`
}

type GetSecretResponseEnvelope

type GetSecretResponseEnvelope struct {
	Key   string             `json:"key"`
	Value transfer.JSONOrStr `json:"value"`
}

type GetSpecResponseEnvelope

type GetSpecResponseEnvelope struct {
	Value        transfer.JSONInterface `json:"value"`
	Unresolvable *UnresolvableEnvelope  `json:"unresolvable"`
	Complete     bool                   `json:"complete"`
}

func NewGetSpecResponseEnvelope

func NewGetSpecResponseEnvelope(rv *evaluate.Result[*spec.References]) *GetSpecResponseEnvelope

type GetStateResponseEnvelope

type GetStateResponseEnvelope struct {
	Key   string                 `json:"key"`
	Value transfer.JSONInterface `json:"value"`
}

type PostEventRequestEnvelope

type PostEventRequestEnvelope struct {
	Data map[string]transfer.JSONInterface `json:"data"`
	Key  string                            `json:"key"`
}

type PostWorkflowRunRequestEnvelope

type PostWorkflowRunRequestEnvelope struct {
	Parameters map[string]openapi.WorkflowRunParameter `json:"parameters"`
}

type PostWorkflowRunResponseEnvelope

type PostWorkflowRunResponseEnvelope struct {
	WorkflowRun *WorkflowRunEnvelope `json:"workflow_run"`
}

type PutActionStatusRequestEnvelope

type PutActionStatusRequestEnvelope struct {
	ProcessState  *ActionStatusProcessState  `json:"process_state"`
	WhenCondition *ActionStatusWhenCondition `json:"when_condition"`
}

type PutOutputMetadataRequestEnvelope

type PutOutputMetadataRequestEnvelope struct {
	Sensitive bool `json:"sensitive"`
}

type Server

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

func NewServer

func NewServer(auth middleware.Authenticator, opts ...ServerOption) *Server

func (*Server) GetConditions

func (s *Server) GetConditions(w http.ResponseWriter, r *http.Request)

func (*Server) GetEnvironment

func (s *Server) GetEnvironment(w http.ResponseWriter, r *http.Request)

func (*Server) GetEnvironmentVariable

func (s *Server) GetEnvironmentVariable(w http.ResponseWriter, r *http.Request)

func (*Server) GetOutput

func (s *Server) GetOutput(w http.ResponseWriter, r *http.Request)

func (*Server) GetSecret

func (s *Server) GetSecret(w http.ResponseWriter, r *http.Request)

func (*Server) GetSpec

func (s *Server) GetSpec(w http.ResponseWriter, r *http.Request)

func (*Server) GetState

func (s *Server) GetState(w http.ResponseWriter, r *http.Request)

func (*Server) PostDecorator

func (s *Server) PostDecorator(w http.ResponseWriter, r *http.Request)

func (*Server) PostEvent

func (s *Server) PostEvent(w http.ResponseWriter, r *http.Request)

func (*Server) PostLog

func (s *Server) PostLog(w http.ResponseWriter, r *http.Request)

func (*Server) PostLogMessage

func (s *Server) PostLogMessage(w http.ResponseWriter, r *http.Request)

func (*Server) PostValidate

func (s *Server) PostValidate(w http.ResponseWriter, r *http.Request)

func (*Server) PostWorkflowRun

func (s *Server) PostWorkflowRun(w http.ResponseWriter, r *http.Request)

func (*Server) PutActionStatus

func (s *Server) PutActionStatus(w http.ResponseWriter, r *http.Request)

func (*Server) PutOutput

func (s *Server) PutOutput(w http.ResponseWriter, r *http.Request)

func (*Server) PutOutputMetadata

func (s *Server) PutOutputMetadata(w http.ResponseWriter, r *http.Request)

func (*Server) Route

func (s *Server) Route(r *mux.Router)

type ServerOption

type ServerOption func(*Server)

func WithSchemaRegistry

func WithSchemaRegistry(reg validation.SchemaRegistry) ServerOption

type UnresolvableEnvelope

type UnresolvableEnvelope struct {
	Data        []spec.DataID       `json:"data,omitempty"`
	Secrets     []spec.SecretID     `json:"secrets,omitempty"`
	Connections []spec.ConnectionID `json:"connections,omitempty"`
	Outputs     []spec.OutputID     `json:"outputs,omitempty"`
	Parameters  []spec.ParameterID  `json:"parameters,omitempty"`
	Answers     []spec.AnswerID     `json:"answers,omitempty"`
	Statuses    []spec.StatusID     `json:"statuses,omitempty"`
}

func NewUnresolvableEnvelope

func NewUnresolvableEnvelope(refs *spec.References) *UnresolvableEnvelope

type WorkflowRunEnvelope

type WorkflowRunEnvelope struct {
	Name      string `json:"name"`
	RunNumber int    `json:"run_number"`
	AppURL    string `json:"app_url,omitempty"`
}

Jump to

Keyboard shortcuts

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