Documentation
¶
Index ¶
- func DefaultPlannerService() (*plannerService, error)
- func NewPlannerService(cred *auth.User) (*plannerService, error)
- type PlannerService
- type ServiceApi
- func (api *ServiceApi) DeleteRequest(path string) (*http.Response, error)
- func (api *ServiceApi) GetRequest(path string) (*http.Response, error)
- func (api *ServiceApi) MultipartRequest(path, filepathStr, assessmentName string) (*http.Response, error)
- func (api *ServiceApi) PostRequest(path string, body []byte) (*http.Response, error)
- func (api *ServiceApi) PutRequest(path string, body []byte) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPlannerService ¶
func DefaultPlannerService() (*plannerService, error)
DefaultPlannerService initializes a planner service using default *auth.User credentials
func NewPlannerService ¶
NewPlannerService initializes the planner service with custom *auth.User credentials
Types ¶
type PlannerService ¶
type PlannerService interface {
// contains filtered or unexported methods
}
PlannerService defines the interface for interacting with the planner service
type ServiceApi ¶
type ServiceApi struct {
// contains filtered or unexported fields
}
func NewServiceApi ¶
func NewServiceApi(cred *auth.User) (*ServiceApi, error)
NewServiceApi creates and returns a new ServiceApi instance, initializing the base URL and HTTP client for making requests to the service API
func (*ServiceApi) DeleteRequest ¶
func (api *ServiceApi) DeleteRequest(path string) (*http.Response, error)
DeleteRequest makes an HTTP DELETE request to the specified path with the provided token for authorization, returning the HTTP response.
func (*ServiceApi) GetRequest ¶
func (api *ServiceApi) GetRequest(path string) (*http.Response, error)
GetRequest makes an HTTP GET request to the specified path, passing the provided token for authorization, and returns the HTTP response
func (*ServiceApi) MultipartRequest ¶ added in v0.3.0
func (api *ServiceApi) MultipartRequest(path, filepathStr, assessmentName string) (*http.Response, error)
MultipartRequest uploads a file and optional fields using multipart/form-data
func (*ServiceApi) PostRequest ¶
PostRequest makes an HTTP POST request to the specified path with the provided body and authorization token, returning the HTTP response
func (*ServiceApi) PutRequest ¶
PutRequest makes an HTTP PUT request to the specified path with the provided body and authorization token, returning the HTTP response.