Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type BasicAuth
- type Configuration
- type DefaultApiService
- func (a *DefaultApiService) CancelTask(ctx _context.Context, taskId string) (*_nethttp.Response, error)
- func (a *DefaultApiService) CreateTask(ctx _context.Context, listId ListId, task Task) (RespTask, *_nethttp.Response, error)
- func (a *DefaultApiService) CreateTaskList(ctx _context.Context, sprintOpts SprintOpts) (*_nethttp.Response, error)
- func (a *DefaultApiService) DeleteTask(ctx _context.Context, listId ListId, taskId string) (*_nethttp.Response, error)
- func (a *DefaultApiService) DoneTask(ctx _context.Context, taskId string) (*_nethttp.Response, error)
- func (a *DefaultApiService) GetSprintTemplate(ctx _context.Context) (SprintTemplate, *_nethttp.Response, error)
- func (a *DefaultApiService) GetTaskList(ctx _context.Context, listId ListId) (TaskList, *_nethttp.Response, error)
- func (a *DefaultApiService) TakeTask(ctx _context.Context, listId ListId, taskId string) (*_nethttp.Response, error)
- func (a *DefaultApiService) UpdateTask(ctx _context.Context, taskId string, updateOptions UpdateOptions) (*_nethttp.Response, error)
- type GenericOpenAPIError
- type ListId
- type RespTask
- type ServerConfiguration
- type ServerVariable
- type SprintOpts
- type SprintTemplate
- type Task
- type TaskList
- type TaskTemplate
- type UpdateOptions
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { DefaultApi *DefaultApiService // contains filtered or unexported fields }
APIClient manages communication with the Task List API v1.0.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
ChangeBasePath changes base path to allow switching to mocks
func (*APIClient) GetConfig ¶
func (c *APIClient) GetConfig() *Configuration
Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` Debug bool `json:"debug,omitempty"` Servers []ServerConfiguration HTTPClient *http.Client }
Configuration stores the configuration of the API client
func NewConfiguration ¶
func NewConfiguration() *Configuration
NewConfiguration returns a new Configuration object
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
AddDefaultHeader adds a new HTTP header to the default header in the request
type DefaultApiService ¶
type DefaultApiService service
DefaultApiService DefaultApi service
func (*DefaultApiService) CancelTask ¶
func (a *DefaultApiService) CancelTask(ctx _context.Context, taskId string) (*_nethttp.Response, error)
CancelTask Method for CancelTask
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param taskId
func (*DefaultApiService) CreateTask ¶
func (a *DefaultApiService) CreateTask(ctx _context.Context, listId ListId, task Task) (RespTask, *_nethttp.Response, error)
CreateTask Method for CreateTask
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param listId
- @param task task to add
@return RespTask
func (*DefaultApiService) CreateTaskList ¶
func (a *DefaultApiService) CreateTaskList(ctx _context.Context, sprintOpts SprintOpts) (*_nethttp.Response, error)
CreateTaskList Method for CreateTaskList
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sprintOpts
func (*DefaultApiService) DeleteTask ¶
func (a *DefaultApiService) DeleteTask(ctx _context.Context, listId ListId, taskId string) (*_nethttp.Response, error)
DeleteTask Method for DeleteTask
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param listId
- @param taskId
func (*DefaultApiService) DoneTask ¶
func (a *DefaultApiService) DoneTask(ctx _context.Context, taskId string) (*_nethttp.Response, error)
DoneTask Method for DoneTask
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param taskId
func (*DefaultApiService) GetSprintTemplate ¶
func (a *DefaultApiService) GetSprintTemplate(ctx _context.Context) (SprintTemplate, *_nethttp.Response, error)
GetSprintTemplate Method for GetSprintTemplate
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return SprintTemplate
func (*DefaultApiService) GetTaskList ¶
func (a *DefaultApiService) GetTaskList(ctx _context.Context, listId ListId) (TaskList, *_nethttp.Response, error)
GetTaskList Method for GetTaskList
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param listId
@return TaskList
func (*DefaultApiService) TakeTask ¶
func (a *DefaultApiService) TakeTask(ctx _context.Context, listId ListId, taskId string) (*_nethttp.Response, error)
TakeTask Method for TakeTask
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param listId
- @param taskId
func (*DefaultApiService) UpdateTask ¶
func (a *DefaultApiService) UpdateTask(ctx _context.Context, taskId string, updateOptions UpdateOptions) (*_nethttp.Response, error)
UpdateTask Method for UpdateTask
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param taskId
- @param updateOptions task updates
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type RespTask ¶
type RespTask struct { Id string `json:"id"` Text string `json:"text"` Points int32 `json:"points"` Burnt int32 `json:"burnt"` State string `json:"state"` }
RespTask struct for RespTask
type ServerConfiguration ¶
type ServerConfiguration struct { Url string Description string Variables map[string]ServerVariable }
ServerConfiguration stores the information about a server
type ServerVariable ¶
ServerVariable stores the information about a server variable
type SprintOpts ¶
type SprintOpts struct {
Title string `json:"title"`
}
SprintOpts struct for SprintOpts
type SprintTemplate ¶
type SprintTemplate struct {
Tasks []TaskTemplate `json:"tasks"`
}
SprintTemplate struct for SprintTemplate
type Task ¶
type Task struct { Text string `json:"text,omitempty"` Points int32 `json:"points,omitempty"` Burnt int32 `json:"burnt,omitempty"` State string `json:"state,omitempty"` }
Task struct for Task
type TaskTemplate ¶
type TaskTemplate struct { Id string `json:"id"` Text string `json:"text"` Points int32 `json:"points"` }
TaskTemplate struct for TaskTemplate
type UpdateOptions ¶
type UpdateOptions struct { Text string `json:"text"` Burnt int32 `json:"burnt"` Points int32 `json:"points"` }
UpdateOptions struct for UpdateOptions