csm

package
v0.0.0-...-12433a2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2018 License: Apache-2.0 Imports: 4 Imported by: 110

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSMConnection

type CSMConnection interface {
	Write(response CSMResponse) error
	WriteError(err error) error
}

func NewCSMFileConnection

func NewCSMFileConnection(filePath string, logger lager.Logger) CSMConnection

type CSMRequest

type CSMRequest struct {
	WorkspaceID  string
	ConnectionID string
	OutputPath   string
}

func GetCSMRequest

func GetCSMRequest(args []string) (*CSMRequest, error)

This assumes that that the args are passed in a specific order as follows: 1. the filepath of the output file 2. the workspace ID 3. the connection ID if present 4. the details JSON

type CSMResponse

type CSMResponse struct {
	ErrorCode    int                 `json:"error_code,omitempty"`
	ErrorMessage string              `json:"error_message,omitempty"`
	Details      interface{}         `json:"details,omitempty"`
	Status       string              `json:"status"`
	ServiceType  string              `json:"service_type"`
	Diagnostics  []*StatusDiagnostic `json:"diagnostics,omitempty"`
}

func CreateCSMErrorResponse

func CreateCSMErrorResponse(errorCode int, errorMessage string) CSMResponse

func CreateCSMResponse

func CreateCSMResponse(details interface{}) CSMResponse

type StatusDiagnostic

type StatusDiagnostic struct {
	Description string `json:"description"`
	Message     string `json:"message"`
	Name        string `json:"name"`
	Status      string `json:"status"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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