Documentation ¶
Index ¶
- Constants
- type ApiClient
- func (apiClient *ApiClient) Get(path RequestPath, response interface{}) *ApiErrorResponse
- func (apiClient *ApiClient) Post(path RequestPath, requestBody interface{}, response interface{}) *ApiErrorResponse
- func (apiClient *ApiClient) PostForm(path RequestPath, requestBody map[string]interface{}, response interface{}) *ApiErrorResponse
- func (apiClient *ApiClient) ProcessRequest(method string, path RequestPath, request interface{}, response interface{}) *ApiErrorResponse
- func (apiClient *ApiClient) ProcessRequestWithHeaders(method string, path RequestPath, request interface{}, response interface{}, ...) *ApiErrorResponse
- func (apiClient *ApiClient) SendAndDeserialize(method string, path RequestPath, request interface{}, response interface{}) (*http.Response, error)
- func (apiClient *ApiClient) SendAndDeserializeWithHeaders(method string, path RequestPath, request interface{}, response interface{}, ...) (*http.Response, error)
- type ApiErrorResponse
- type ControlPlaneClient
- type DataPlaneClient
- func (client *DataPlaneClient) AddJourneyFeedback(journeyId string, feedback *journeyFeedbackProto.JourneyFeedback) *ApiErrorResponse
- func (client *DataPlaneClient) DescribeJourney(journeyId string) (*dataPlaneProto.JourneyDetailResponse, *ApiErrorResponse)
- func (client *DataPlaneClient) DescribeSession(sessionId string, minimal bool) (*dataPlaneSDKProto.Session, *ApiErrorResponse)
- func (client *DataPlaneClient) GetJourneyFeedback(journeyId string) (*journeyFeedbackProto.JourneyFeedback, *ApiErrorResponse)
- func (client *DataPlaneClient) ListJourneys(listJourneyConfig config.ListJourneyConfig) (*dataPlaneProto.JourneyListResponse, *ApiErrorResponse)
- func (client *DataPlaneClient) ListSessionFeatures(sessionId string, region *string) (*dataPlaneProto.SessionFeaturesResponse, *ApiErrorResponse)
- func (client *DataPlaneClient) ListSessionSignals(sessionId string, region *string) (*dataPlaneProto.SignalsResponse, *ApiErrorResponse)
- func (client *DataPlaneClient) ListSessions(listSessionConfig config.ListSessionConfig) (*dataPlaneProto.SessionListResponse, *ApiErrorResponse)
- func (client *DataPlaneClient) ReadSession(sessionId string, region *string) ([]*bundle.SealedBundle, *ApiErrorResponse)
- func (client *DataPlaneClient) UpdateSessionLabels(sessionId string, labels []string) *ApiErrorResponse
- func (client *DataPlaneClient) WhoAmI() (*commonProto.TokenSelfResponse, *ApiErrorResponse)
- type DynamicPath
- type RequestPath
- type StaticPath
Constants ¶
View Source
const ( InvalidRequestError = "invalid_request_error" APIError = "api_error" )
Common error reasons
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiClient ¶
type ApiClient struct { BaseUrl string ServiceName string UrlBasedAccessKey string HeaderBasedAccessKey string HttpClient *http.Client }
func (*ApiClient) Get ¶
func (apiClient *ApiClient) Get(path RequestPath, response interface{}) *ApiErrorResponse
func (*ApiClient) Post ¶
func (apiClient *ApiClient) Post(path RequestPath, requestBody interface{}, response interface{}) *ApiErrorResponse
func (*ApiClient) PostForm ¶
func (apiClient *ApiClient) PostForm(path RequestPath, requestBody map[string]interface{}, response interface{}) *ApiErrorResponse
func (*ApiClient) ProcessRequest ¶
func (apiClient *ApiClient) ProcessRequest(method string, path RequestPath, request interface{}, response interface{}) *ApiErrorResponse
func (*ApiClient) ProcessRequestWithHeaders ¶
func (apiClient *ApiClient) ProcessRequestWithHeaders(method string, path RequestPath, request interface{}, response interface{}, headers map[string]string) *ApiErrorResponse
func (*ApiClient) SendAndDeserialize ¶
func (*ApiClient) SendAndDeserializeWithHeaders ¶
type ApiErrorResponse ¶
type ApiErrorResponse struct { Error error // The raw error from the HTTP request HttpResponse *http.Response // The raw response from the HTTP request StatusCode int // The status code, possibly adjusted by the API client ErrorResponse commonProto.ErrorResponse // A pre-built ErrorResponse }
A method for tracking an API error and it's parts
func (*ApiErrorResponse) String ¶
func (err *ApiErrorResponse) String() string
type ControlPlaneClient ¶
type ControlPlaneClient struct {
// contains filtered or unexported fields
}
func NewControlPlaneClient ¶
func NewControlPlaneClient(c config.SDKConfig) *ControlPlaneClient
func (*ControlPlaneClient) ListRegions ¶
func (client *ControlPlaneClient) ListRegions() ([]*controlPlaneProto.DataPlaneRegion, *ApiErrorResponse)
type DataPlaneClient ¶
type DataPlaneClient struct {
// contains filtered or unexported fields
}
func NewDataPlaneClient ¶
func NewDataPlaneClient(c config.SDKConfig) *DataPlaneClient
func (*DataPlaneClient) AddJourneyFeedback ¶ added in v0.2.0
func (client *DataPlaneClient) AddJourneyFeedback(journeyId string, feedback *journeyFeedbackProto.JourneyFeedback) *ApiErrorResponse
func (*DataPlaneClient) DescribeJourney ¶ added in v0.2.0
func (client *DataPlaneClient) DescribeJourney(journeyId string) (*dataPlaneProto.JourneyDetailResponse, *ApiErrorResponse)
func (*DataPlaneClient) DescribeSession ¶
func (client *DataPlaneClient) DescribeSession(sessionId string, minimal bool) (*dataPlaneSDKProto.Session, *ApiErrorResponse)
func (*DataPlaneClient) GetJourneyFeedback ¶ added in v0.2.0
func (client *DataPlaneClient) GetJourneyFeedback(journeyId string) (*journeyFeedbackProto.JourneyFeedback, *ApiErrorResponse)
func (*DataPlaneClient) ListJourneys ¶ added in v0.2.0
func (client *DataPlaneClient) ListJourneys(listJourneyConfig config.ListJourneyConfig) (*dataPlaneProto.JourneyListResponse, *ApiErrorResponse)
func (*DataPlaneClient) ListSessionFeatures ¶
func (client *DataPlaneClient) ListSessionFeatures(sessionId string, region *string) (*dataPlaneProto.SessionFeaturesResponse, *ApiErrorResponse)
func (*DataPlaneClient) ListSessionSignals ¶
func (client *DataPlaneClient) ListSessionSignals(sessionId string, region *string) (*dataPlaneProto.SignalsResponse, *ApiErrorResponse)
func (*DataPlaneClient) ListSessions ¶
func (client *DataPlaneClient) ListSessions(listSessionConfig config.ListSessionConfig) (*dataPlaneProto.SessionListResponse, *ApiErrorResponse)
func (*DataPlaneClient) ReadSession ¶
func (client *DataPlaneClient) ReadSession(sessionId string, region *string) ([]*bundle.SealedBundle, *ApiErrorResponse)
func (*DataPlaneClient) UpdateSessionLabels ¶
func (client *DataPlaneClient) UpdateSessionLabels(sessionId string, labels []string) *ApiErrorResponse
func (*DataPlaneClient) WhoAmI ¶
func (client *DataPlaneClient) WhoAmI() (*commonProto.TokenSelfResponse, *ApiErrorResponse)
type DynamicPath ¶
func NewDynamicPath ¶
func NewDynamicPath(dynamicPath string, params map[string]string) *DynamicPath
func (*DynamicPath) Encode ¶
func (d *DynamicPath) Encode() string
func (*DynamicPath) RawPath ¶
func (s *DynamicPath) RawPath() string
type RequestPath ¶
Generic Path representation
type StaticPath ¶
type StaticPath struct {
Path string
}
Static Paths just store the path
func NewStaticPath ¶
func NewStaticPath(path string) *StaticPath
func (*StaticPath) Encode ¶
func (s *StaticPath) Encode() string
func (*StaticPath) RawPath ¶
func (s *StaticPath) RawPath() string
Click to show internal directories.
Click to hide internal directories.