Documentation
¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type BasicAuth
- type Configuration
- type CustomField
- type Feature
- type FeatureMeta
- type FeatureUpdate
- type FeatureWorkflowStatus
- type FeatureWrap
- type FeaturesApiService
- func (a *FeaturesApiService) GetFeature(ctx _context.Context, featureId string) (FeatureWrap, *_nethttp.Response, error)
- func (a *FeaturesApiService) GetFeatures(ctx _context.Context, localVarOptionals *GetFeaturesOpts) (FeaturesResponse, *_nethttp.Response, error)
- func (a *FeaturesApiService) GetReleaseFeatures(ctx _context.Context, releaseId string, ...) (FeaturesResponse, *_nethttp.Response, error)
- func (a *FeaturesApiService) UpdateFeature(ctx _context.Context, featureId string, feature FeatureUpdate) (FeatureWrap, *_nethttp.Response, error)
- type FeaturesResponse
- type GenericOpenAPIError
- type GetFeaturesOpts
- type GetProductReleasesOpts
- type GetProductsOpts
- type GetReleaseFeaturesOpts
- type Pagination
- type Product
- type ProductMeta
- type ProductResponse
- type ProductsApiService
- type ProductsResponse
- type Release
- type ReleaseUpdate
- type ReleaseUpdateWrap
- type ReleaseWrap
- type ReleasesApiService
- func (a *ReleasesApiService) GetProductReleases(ctx _context.Context, productId string, ...) (ReleasesResponse, *_nethttp.Response, error)
- func (a *ReleasesApiService) GetRelease(ctx _context.Context, releaseId string) (ReleaseWrap, *_nethttp.Response, error)
- func (a *ReleasesApiService) UpdateProductRelease(ctx _context.Context, productId string, releaseId string, ...) (ReleaseWrap, *_nethttp.Response, error)
- type ReleasesResponse
- type User
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 {
FeaturesApi *FeaturesApiService
ProductsApi *ProductsApiService
ReleasesApi *ReleasesApiService
// contains filtered or unexported fields
}
APIClient manages communication with the Aha.io API 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
func (*APIClient) HTTPClient ¶
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct {
*http.Response `json:"-"`
Message string `json:"message,omitempty"`
// Operation is the name of the OpenAPI operation.
Operation string `json:"operation,omitempty"`
// RequestURL is the request URL. This value is always available, even if the
// embedded *http.Response is nil.
RequestURL string `json:"url,omitempty"`
// Method is the HTTP method used for the request. This value is always
// available, even if the embedded *http.Response is nil.
Method string `json:"method,omitempty"`
// Payload holds the contents of the response body (which may be nil or empty).
// This is provided here as the raw response.Body() reader will have already
// been drained.
Payload []byte `json:"-"`
}
APIResponse stores the API response returned by the server.
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
NewAPIResponse returns a new APIResonse object.
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
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"`
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 CustomField ¶
type CustomField struct {
Key string `json:"key,omitempty"`
Name string `json:"name,omitempty"`
Value string `json:"value,omitempty"`
Type string `json:"type,omitempty"`
}
CustomField struct for CustomField
type Feature ¶
type Feature struct {
Id string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CommentsCount int64 `json:"comments_count,omitempty"`
CustomFields []CustomField `json:"custom_fields,omitempty"`
// Due date in YYYY-MM-DD format.
DueDate string `json:"due_date,omitempty"`
Name string `json:"name,omitempty"`
ProductId string `json:"product_id,omitempty"`
ProgressSource string `json:"progress_source,omitempty"`
ReferenceNum string `json:"reference_num,omitempty"`
Release Release `json:"release,omitempty"`
// API URL for the resource.
Resource string `json:"resource,omitempty"`
// Start date in YYYY-MM-DD format.
StartDate string `json:"start_date,omitempty"`
Tags []string `json:"tags,omitempty"`
// Web UI URL for the resource.
Url string `json:"url,omitempty"`
WorkUnits int64 `json:"work_units,omitempty"`
WorkflowStatus FeatureWorkflowStatus `json:"workflow_status,omitempty"`
}
Feature struct for Feature
type FeatureMeta ¶
type FeatureMeta struct {
Id string `json:"id,omitempty"`
ReferenceNum string `json:"reference_num,omitempty"`
Name string `json:"name,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
Url string `json:"url,omitempty"`
Resource string `json:"resource,omitempty"`
}
FeatureMeta struct for FeatureMeta
type FeatureUpdate ¶
type FeatureUpdate struct {
// Name of the feature
Name string `json:"name,omitempty"`
// Description of the feature and it can include HTML formatting.
Description string `json:"description,omitempty"`
// Email address of user that created the feature.
CreatedBy string `json:"created_by,omitempty"`
// Email address of user that is assigned the feature.
AssignedToUser string `json:"assigned_to_user,omitempty"`
// Tags can be automatically assigned to the new feature. If more than one tag is used then tags should be separated by commas
Tags string `json:"tags,omitempty"`
// Set the original estimated effort in a text format, you can use d, h, min (or 'p' for points) to indicate the units to use.
OriginalEstimateText string `json:"original_estimate_text,omitempty"`
// Set the remaining estimated effort in a text format, you can use d, h, min (or 'p' for points) to indicate the units to use.
RemainingEstimateText string `json:"remaining_estimate_text,omitempty"`
// Date that work will start on the feature in format YYYY-MM-DD.
StartDate string `json:"start_date,omitempty"`
// Date that work is due to be completed on the feature in format YYYY-MM-DD.
DueDate string `json:"due_date,omitempty"`
// Name or id of release phase which the feature belongs to.
ReleasePhase string `json:"release_phase,omitempty"`
// Name or id of initiative which the feature belongs to.
Initiative string `json:"initiative,omitempty"`
// Name or id of master feature which the feature belongs to.
MasterFeature string `json:"master_feature,omitempty"`
}
FeatureUpdate struct for FeatureUpdate
type FeatureWorkflowStatus ¶
type FeatureWorkflowStatus struct {
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Position int64 `json:"position,omitempty"`
Complete bool `json:"complete,omitempty"`
Color string `json:"color,omitempty"`
}
FeatureWorkflowStatus struct for FeatureWorkflowStatus
type FeatureWrap ¶
type FeatureWrap struct {
Feature Feature `json:"feature,omitempty"`
}
FeatureWrap struct for FeatureWrap
type FeaturesApiService ¶
type FeaturesApiService service
FeaturesApiService FeaturesApi service
func (*FeaturesApiService) GetFeature ¶
func (a *FeaturesApiService) GetFeature(ctx _context.Context, featureId string) (FeatureWrap, *_nethttp.Response, error)
GetFeature Method for GetFeature Get a specific feature
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param featureId Numeric ID, or key of the feature to be retrieved
@return FeatureWrap
func (*FeaturesApiService) GetFeatures ¶
func (a *FeaturesApiService) GetFeatures(ctx _context.Context, localVarOptionals *GetFeaturesOpts) (FeaturesResponse, *_nethttp.Response, error)
GetFeatures Get all features Get all features
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param optional nil or *GetFeaturesOpts - Optional Parameters:
- @param "Q" (optional.String) - Sub-string to match against feature name or ID
- @param "UpdatedSince" (optional.Time) - UTC timestamp (in ISO8601 format) that the updated_at field must be larger than.
- @param "Tag" (optional.String) - A string tag value.
- @param "AssignedToUser" (optional.String) - The ID or email address of user to return assigned features for.
- @param "Page" (optional.Int32) - A specific page of results.
- @param "PerPage" (optional.Int32) - Number of results per page.
@return FeaturesResponse
func (*FeaturesApiService) GetReleaseFeatures ¶
func (a *FeaturesApiService) GetReleaseFeatures(ctx _context.Context, releaseId string, localVarOptionals *GetReleaseFeaturesOpts) (FeaturesResponse, *_nethttp.Response, error)
GetReleaseFeatures Get all features for a release Get all features for a release
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param releaseId Numeric ID, or key of the release to retrieve features for
- @param optional nil or *GetReleaseFeaturesOpts - Optional Parameters:
- @param "Page" (optional.Int32) - A specific page of results.
- @param "PerPage" (optional.Int32) - Number of results per page.
@return FeaturesResponse
func (*FeaturesApiService) UpdateFeature ¶
func (a *FeaturesApiService) UpdateFeature(ctx _context.Context, featureId string, feature FeatureUpdate) (FeatureWrap, *_nethttp.Response, error)
UpdateFeature Update a feature's custom fields with tag-like value Update a feature's custom fields with tag-like value
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param featureId Numeric ID, or key of the feature to be retrieved
- @param feature Feature properties to update
@return FeatureWrap
type FeaturesResponse ¶
type FeaturesResponse struct {
Features []FeatureMeta `json:"features,omitempty"`
Pagination Pagination `json:"pagination,omitempty"`
}
FeaturesResponse struct for FeaturesResponse
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 GetFeaturesOpts ¶
type GetFeaturesOpts struct {
Q optional.String
UpdatedSince optional.Time
Tag optional.String
AssignedToUser optional.String
Page optional.Int32
PerPage optional.Int32
}
GetFeaturesOpts Optional parameters for the method 'GetFeatures'
type GetProductReleasesOpts ¶
GetProductReleasesOpts Optional parameters for the method 'GetProductReleases'
type GetProductsOpts ¶
GetProductsOpts Optional parameters for the method 'GetProducts'
type GetReleaseFeaturesOpts ¶
GetReleaseFeaturesOpts Optional parameters for the method 'GetReleaseFeatures'
type Pagination ¶
type Pagination struct {
TotalRecords int64 `json:"total_records,omitempty"`
TotalPages int64 `json:"total_pages,omitempty"`
CurrentPage int64 `json:"current_page,omitempty"`
}
Pagination struct for Pagination
type Product ¶
type Product struct {
// A unique identifier for the product.
Id string `json:"id,omitempty"`
// The reference prefix slug for the product.
ReferencePrefix string `json:"reference_prefix,omitempty"`
// The name for the product.
Name string `json:"name,omitempty"`
// Whether the product is a product line or not.
ProductLine bool `json:"product_line,omitempty"`
// The date-time when the product was created.
CreatedAt time.Time `json:"created_at,omitempty"`
// The date-time when the product was updated.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// User URL for the project.
Url string `json:"url,omitempty"`
// User URL for the project.
Resource string `json:"resource,omitempty"`
// Whether the product has ideas or not.
HasIdeas bool `json:"has_ideas,omitempty"`
// Whether the product has master features or not.
HasMasterFeatures bool `json:"has_master_features,omitempty"`
}
Product struct for Product
type ProductMeta ¶
type ProductMeta struct {
// A unique identifier for the product.
Id string `json:"id,omitempty"`
// The reference prefix slug for the product.
ReferencePrefix string `json:"reference_prefix,omitempty"`
// The name for the product.
Name string `json:"name,omitempty"`
// Whether the product is a product line or not.
ProductLine bool `json:"product_line,omitempty"`
// The date-time when the product was created.
CreatedAt time.Time `json:"created_at,omitempty"`
}
ProductMeta struct for ProductMeta
type ProductResponse ¶
type ProductResponse struct {
Product Product `json:"product,omitempty"`
}
ProductResponse struct for ProductResponse
type ProductsApiService ¶
type ProductsApiService service
ProductsApiService ProductsApi service
func (*ProductsApiService) GetProduct ¶
func (a *ProductsApiService) GetProduct(ctx _context.Context, productId string) (ProductResponse, *_nethttp.Response, error)
GetProduct Products API Get product info
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param productId Numeric ID, or key of the feature to be retrieved
@return ProductResponse
func (*ProductsApiService) GetProducts ¶
func (a *ProductsApiService) GetProducts(ctx _context.Context, localVarOptionals *GetProductsOpts) (ProductsResponse, *_nethttp.Response, error)
GetProducts Products API Get products list
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param optional nil or *GetProductsOpts - Optional Parameters:
- @param "Page" (optional.Int32) - A specific page of results.
- @param "PerPage" (optional.Int32) - Number of results per page.
@return ProductsResponse
type ProductsResponse ¶
type ProductsResponse struct {
Products []ProductMeta `json:"products,omitempty"`
Pagination Pagination `json:"pagination,omitempty"`
}
ProductsResponse struct for ProductsResponse
type Release ¶
type Release struct {
// A unique identifier for the release.
Id string `json:"id,omitempty"`
// Release referenence number.
ReferenceNum string `json:"reference_num,omitempty"`
// Release name.
Name string `json:"name,omitempty"`
// Start date in YYYY-MM-DD format.
StartDate string `json:"start_date,omitempty"`
// Release date in YYYY-MM-DD format.
ReleaseDate string `json:"release_date,omitempty"`
// External release date in YYYY-MM-DD format.
ExternalReleaseDate string `json:"external_release_date,omitempty"`
Released bool `json:"released,omitempty"`
ParkingLot bool `json:"parking_lot,omitempty"`
// Web URL for release.
Url string `json:"url,omitempty"`
// API URL for release.
Resource string `json:"resource,omitempty"`
}
Release struct for Release
type ReleaseUpdate ¶
type ReleaseUpdate struct {
// Release name.
Name string `json:"name,omitempty"`
// Start date in YYYY-MM-DD format.
StartDate string `json:"start_date,omitempty"`
// Release date in YYYY-MM-DD format.
ReleaseDate string `json:"release_date,omitempty"`
// Date Development started in format YYYY-MM-DD
DevelopmentStartedOn string `json:"development_started_on,omitempty"`
// The external release date for this feature in format YYYY-MM-DD
ExternalReleaseDate string `json:"external_release_date,omitempty"`
ParkingLot bool `json:"parking_lot,omitempty"`
}
ReleaseUpdate struct for ReleaseUpdate
type ReleaseUpdateWrap ¶
type ReleaseUpdateWrap struct {
Release ReleaseUpdate `json:"release,omitempty"`
}
ReleaseUpdateWrap struct for ReleaseUpdateWrap
type ReleaseWrap ¶
type ReleaseWrap struct {
Release Release `json:"release,omitempty"`
}
ReleaseWrap struct for ReleaseWrap
type ReleasesApiService ¶
type ReleasesApiService service
ReleasesApiService ReleasesApi service
func (*ReleasesApiService) GetProductReleases ¶
func (a *ReleasesApiService) GetProductReleases(ctx _context.Context, productId string, localVarOptionals *GetProductReleasesOpts) (ReleasesResponse, *_nethttp.Response, error)
GetProductReleases Method for GetProductReleases Get releases for a product release
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param productId Numeric ID, or key of the product to retrieve releases for.
- @param optional nil or *GetProductReleasesOpts - Optional Parameters:
- @param "Page" (optional.Int32) - A specific page of results.
- @param "PerPage" (optional.Int32) - Number of results per page.
@return ReleasesResponse
func (*ReleasesApiService) GetRelease ¶
func (a *ReleasesApiService) GetRelease(ctx _context.Context, releaseId string) (ReleaseWrap, *_nethttp.Response, error)
GetRelease Method for GetRelease Get a specific release
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param releaseId Numeric ID, or key of the release to be retrieved
@return ReleaseWrap
func (*ReleasesApiService) UpdateProductRelease ¶
func (a *ReleasesApiService) UpdateProductRelease(ctx _context.Context, productId string, releaseId string, release ReleaseUpdateWrap) (ReleaseWrap, *_nethttp.Response, error)
UpdateProductRelease Update a release Update a release
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param productId Numeric ID, or key of the product to create the release in
- @param releaseId Numeric ID, or key of the release to be updated
- @param release Release properties to update
@return ReleaseWrap
type ReleasesResponse ¶
type ReleasesResponse struct {
Releases []Release `json:"releases,omitempty"`
Pagination Pagination `json:"pagination,omitempty"`
}
ReleasesResponse struct for ReleasesResponse
type User ¶
type User struct {
// First name of the user
FirstName string `json:"first_name,omitempty"`
// Last name of the user
LastName string `json:"last_name,omitempty"`
// Email of the user
Email string `json:"email,omitempty"`
// Permissions of the user in the product one of: product_owner, contributor, reviewer, viewer, none
Role string `json:"role,omitempty"`
}
User struct for User
Source Files
¶
- api_features.go
- api_products.go
- api_releases.go
- client.go
- configuration.go
- model_custom_field.go
- model_feature.go
- model_feature_meta.go
- model_feature_update.go
- model_feature_workflow_status.go
- model_feature_wrap.go
- model_features_response.go
- model_pagination.go
- model_product.go
- model_product_meta.go
- model_product_response.go
- model_products_response.go
- model_release.go
- model_release_update.go
- model_release_update_wrap.go
- model_release_wrap.go
- model_releases_response.go
- model_user.go
- response.go