Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertStructToJSON ¶
func ConvertStructToJSON(obj OctoPayload) (*strings.Reader, error)
Types ¶
type OctoClient ¶
func New ¶
func New(options Options) *OctoClient
func (*OctoClient) ServiceInvoke ¶
func (o *OctoClient) ServiceInvoke(ctx context.Context, payload OctoPayload) (*OctoResponse, error)
func (*OctoClient) ServiceInvokeForm ¶ added in v0.2.0
func (o *OctoClient) ServiceInvokeForm(ctx context.Context, payload OctoPayloadForm) (*OctoResponse, error)
type OctoFileField ¶ added in v0.2.0
type OctoHeader ¶ added in v0.2.1
type OctoPayload ¶
type OctoPayload struct { ServiceID string `json:"serviceID"` QueryParams []OctoQueryParam `json:"queryParameters"` DynamicHeaders []OctoHeader `json:"dynamicHeaders"` Data map[string]interface{} `json:"data"` RequestID string `json:"requestID"` // Acts as unique identifier for each request. }
type OctoPayloadForm ¶ added in v0.2.0
type OctoPayloadForm struct { ServiceID string `json:"serviceID"` TextFields []OctoTextField `json:"textFields"` FileFields []OctoFileField `json:"fileFields"` }
type OctoQueryParam ¶ added in v0.2.1
Usage:
- Create object of OctoConfig with clientID/access-token, baseURL of Octopus & others
- Create instance of Octo-Client once using this object
- call the service-invoke using the payload.
- The other features like pathParams will be included in payload
type OctoResponse ¶
type OctoResponse struct { Message string `json:"msg"` RequestID uuid.UUID `json:"requestId"` Data map[string]interface{} `json:"data"` }
func ConvertByteToStruct ¶
func ConvertByteToStruct(body []byte) (OctoResponse, error)
type OctoTextField ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.