Documentation
¶
Index ¶
- Constants
- func IsNotFound(err error) bool
- func NormalizeUrl(existingUrl string) (string, error)
- type Action
- type ApiError
- type ApiVersion
- type ApiVersionClient
- func (c *ApiVersionClient) ById(id string) (*ApiVersion, error)
- func (c *ApiVersionClient) Create(container *ApiVersion) (*ApiVersion, error)
- func (c *ApiVersionClient) Delete(container *ApiVersion) error
- func (c *ApiVersionClient) List(opts *ListOpts) (*ApiVersionCollection, error)
- func (c *ApiVersionClient) Update(existing *ApiVersion, updates interface{}) (*ApiVersion, error)
- type ApiVersionCollection
- type ApiVersionOperations
- type Catalog
- type CatalogClient
- func (c *CatalogClient) ById(id string) (*Catalog, error)
- func (c *CatalogClient) Create(container *Catalog) (*Catalog, error)
- func (c *CatalogClient) Delete(container *Catalog) error
- func (c *CatalogClient) List(opts *ListOpts) (*CatalogCollection, error)
- func (c *CatalogClient) Update(existing *Catalog, updates interface{}) (*Catalog, error)
- type CatalogCollection
- type CatalogOperations
- type ClientOpts
- type Collection
- type Condition
- type Error
- type ErrorClient
- func (c *ErrorClient) ById(id string) (*Error, error)
- func (c *ErrorClient) Create(container *Error) (*Error, error)
- func (c *ErrorClient) Delete(container *Error) error
- func (c *ErrorClient) List(opts *ListOpts) (*ErrorCollection, error)
- func (c *ErrorClient) Update(existing *Error, updates interface{}) (*Error, error)
- type ErrorCollection
- type ErrorOperations
- type Field
- type Filter
- type GenericCollection
- type ListOpts
- type Pagination
- type Question
- type QuestionClient
- func (c *QuestionClient) ById(id string) (*Question, error)
- func (c *QuestionClient) Create(container *Question) (*Question, error)
- func (c *QuestionClient) Delete(container *Question) error
- func (c *QuestionClient) List(opts *ListOpts) (*QuestionCollection, error)
- func (c *QuestionClient) Update(existing *Question, updates interface{}) (*Question, error)
- type QuestionCollection
- type QuestionOperations
- type RancherBaseClient
- type RancherBaseClientImpl
- func (rancherClient *RancherBaseClientImpl) Action(schemaType string, action string, existing *Resource, ...) error
- func (rancherClient *RancherBaseClientImpl) ById(schemaType string, id string, respObject interface{}) error
- func (rancherClient *RancherBaseClientImpl) Create(schemaType string, createObj interface{}, respObject interface{}) error
- func (rancherClient *RancherBaseClientImpl) Delete(existing *Resource) error
- func (rancherClient *RancherBaseClientImpl) GetLink(resource Resource, link string, respObject interface{}) error
- func (rancherClient *RancherBaseClientImpl) GetOpts() *ClientOpts
- func (rancherClient *RancherBaseClientImpl) GetSchemas() *Schemas
- func (rancherClient *RancherBaseClientImpl) GetTypes() map[string]Schema
- func (rancherClient *RancherBaseClientImpl) List(schemaType string, opts *ListOpts, respObject interface{}) error
- func (rancherClient *RancherBaseClientImpl) Post(url string, createObj interface{}, respObject interface{}) error
- func (rancherClient *RancherBaseClientImpl) Reload(existing *Resource, output interface{}) error
- func (rancherClient *RancherBaseClientImpl) SetCustomHeaders(headers map[string]string)
- func (rancherClient *RancherBaseClientImpl) Update(schemaType string, existing *Resource, updates interface{}, ...) error
- func (rancherClient *RancherBaseClientImpl) Websocket(url string, headers map[string][]string) (*websocket.Conn, *http.Response, error)
- type RancherClient
- type Resource
- type ResourceCollection
- type Schema
- type Schemas
- type Sort
- type Template
- type TemplateClient
- func (c *TemplateClient) ById(id string) (*Template, error)
- func (c *TemplateClient) Create(container *Template) (*Template, error)
- func (c *TemplateClient) Delete(container *Template) error
- func (c *TemplateClient) List(opts *ListOpts) (*TemplateCollection, error)
- func (c *TemplateClient) Update(existing *Template, updates interface{}) (*Template, error)
- type TemplateCollection
- type TemplateOperations
- type TemplateVersion
- type TemplateVersionClient
- func (c *TemplateVersionClient) ById(id string) (*TemplateVersion, error)
- func (c *TemplateVersionClient) Create(container *TemplateVersion) (*TemplateVersion, error)
- func (c *TemplateVersionClient) Delete(container *TemplateVersion) error
- func (c *TemplateVersionClient) List(opts *ListOpts) (*TemplateVersionCollection, error)
- func (c *TemplateVersionClient) Update(existing *TemplateVersion, updates interface{}) (*TemplateVersion, error)
- type TemplateVersionCollection
- type TemplateVersionOperations
Constants ¶
View Source
const ( SELF = "self" COLLECTION = "collection" )
View Source
const (
API_VERSION_TYPE = "apiVersion"
)
View Source
const (
CATALOG_TYPE = "catalog"
)
View Source
const (
ERROR_TYPE = "error"
)
View Source
const (
QUESTION_TYPE = "question"
)
View Source
const (
TEMPLATE_TYPE = "template"
)
View Source
const (
TEMPLATE_VERSION_TYPE = "templateVersion"
)
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
func NormalizeUrl ¶
Types ¶
type ApiVersion ¶
type ApiVersionClient ¶
type ApiVersionClient struct {
// contains filtered or unexported fields
}
func (*ApiVersionClient) ById ¶
func (c *ApiVersionClient) ById(id string) (*ApiVersion, error)
func (*ApiVersionClient) Create ¶
func (c *ApiVersionClient) Create(container *ApiVersion) (*ApiVersion, error)
func (*ApiVersionClient) Delete ¶
func (c *ApiVersionClient) Delete(container *ApiVersion) error
func (*ApiVersionClient) List ¶
func (c *ApiVersionClient) List(opts *ListOpts) (*ApiVersionCollection, error)
func (*ApiVersionClient) Update ¶
func (c *ApiVersionClient) Update(existing *ApiVersion, updates interface{}) (*ApiVersion, error)
type ApiVersionCollection ¶
type ApiVersionCollection struct { Collection Data []ApiVersion `json:"data,omitempty"` // contains filtered or unexported fields }
func (*ApiVersionCollection) Next ¶
func (cc *ApiVersionCollection) Next() (*ApiVersionCollection, error)
type ApiVersionOperations ¶
type ApiVersionOperations interface { List(opts *ListOpts) (*ApiVersionCollection, error) Create(opts *ApiVersion) (*ApiVersion, error) Update(existing *ApiVersion, updates interface{}) (*ApiVersion, error) ById(id string) (*ApiVersion, error) Delete(container *ApiVersion) error }
type Catalog ¶
type Catalog struct { Resource `yaml:"-"` Actions map[string]string `json:"actions,omitempty" yaml:"actions,omitempty"` Branch string `json:"branch,omitempty" yaml:"branch,omitempty"` Commit string `json:"commit,omitempty" yaml:"commit,omitempty"` EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"` Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` Links map[string]string `json:"links,omitempty" yaml:"links,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Type string `json:"type,omitempty" yaml:"type,omitempty"` Url string `json:"url,omitempty" yaml:"url,omitempty"` }
type CatalogClient ¶
type CatalogClient struct {
// contains filtered or unexported fields
}
func (*CatalogClient) Delete ¶
func (c *CatalogClient) Delete(container *Catalog) error
func (*CatalogClient) List ¶
func (c *CatalogClient) List(opts *ListOpts) (*CatalogCollection, error)
type CatalogCollection ¶
type CatalogCollection struct { Collection Data []Catalog `json:"data,omitempty"` // contains filtered or unexported fields }
func (*CatalogCollection) Next ¶
func (cc *CatalogCollection) Next() (*CatalogCollection, error)
type CatalogOperations ¶
type ClientOpts ¶
type Collection ¶
type Collection struct { Type string `json:"type,omitempty"` ResourceType string `json:"resourceType,omitempty"` Links map[string]string `json:"links,omitempty"` CreateTypes map[string]string `json:"createTypes,omitempty"` Actions map[string]string `json:"actions,omitempty"` SortLinks map[string]string `json:"sortLinks,omitempty"` Pagination *Pagination `json:"pagination,omitempty"` Sort *Sort `json:"sort,omitempty"` Filters map[string][]Condition `json:"filters,omitempty"` }
type Condition ¶
type Condition struct { Modifier string `json:"modifier,omitempty"` Value interface{} `json:"value,omitempty"` }
type Error ¶
type Error struct { Resource `yaml:"-"` Actions map[string]string `json:"actions,omitempty" yaml:"actions,omitempty"` Links map[string]string `json:"links,omitempty" yaml:"links,omitempty"` Message string `json:"message,omitempty" yaml:"message,omitempty"` Status string `json:"status,omitempty" yaml:"status,omitempty"` Type string `json:"type,omitempty" yaml:"type,omitempty"` }
type ErrorClient ¶
type ErrorClient struct {
// contains filtered or unexported fields
}
func (*ErrorClient) Delete ¶
func (c *ErrorClient) Delete(container *Error) error
func (*ErrorClient) List ¶
func (c *ErrorClient) List(opts *ListOpts) (*ErrorCollection, error)
type ErrorCollection ¶
type ErrorCollection struct { Collection Data []Error `json:"data,omitempty"` // contains filtered or unexported fields }
func (*ErrorCollection) Next ¶
func (cc *ErrorCollection) Next() (*ErrorCollection, error)
type ErrorOperations ¶
type Field ¶
type Field struct { Type string `json:"type,omitempty"` Default interface{} `json:"default,omitempty"` Unique bool `json:"unique,omitempty"` Nullable bool `json:"nullable,omitempty"` Create bool `json:"create,omitempty"` Required bool `json:"required,omitempty"` Update bool `json:"update,omitempty"` MinLength *int64 `json:"minLength,omitempty"` MaxLength *int64 `json:"maxLength,omitempty"` Min *int64 `json:"min,omitempty"` Max *int64 `json:"max,omitempty"` Options []string `json:"options,omitempty"` ValidChars string `json:"validChars,omitempty"` InvalidChars string `json:"invalidChars,omitempty"` Description string `json:"description,omitempty"` }
type GenericCollection ¶
type GenericCollection struct { Collection Data []interface{} `json:"data,omitempty"` }
type ListOpts ¶
type ListOpts struct {
Filters map[string]interface{}
}
func NewListOpts ¶
func NewListOpts() *ListOpts
type Pagination ¶
type Pagination struct { Marker string `json:"marker,omitempty"` First string `json:"first,omitempty"` Previous string `json:"previous,omitempty"` Next string `json:"next,omitempty"` Limit *int64 `json:"limit,omitempty"` Total *int64 `json:"total,omitempty"` Partial bool `json:"partial,omitempty"` }
type Question ¶
type Question struct { Resource `yaml:"-"` Default string `json:"default,omitempty" yaml:"default,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Group string `json:"group,omitempty" yaml:"group,omitempty"` InvalidChars string `json:"invalidChars,omitempty" yaml:"invalid_chars,omitempty"` Label string `json:"label,omitempty" yaml:"label,omitempty"` Max int64 `json:"max,omitempty" yaml:"max,omitempty"` MaxLength int64 `json:"maxLength,omitempty" yaml:"max_length,omitempty"` Min int64 `json:"min,omitempty" yaml:"min,omitempty"` MinLength int64 `json:"minLength,omitempty" yaml:"min_length,omitempty"` Options []string `json:"options,omitempty" yaml:"options,omitempty"` Required bool `json:"required,omitempty" yaml:"required,omitempty"` Type string `json:"type,omitempty" yaml:"type,omitempty"` ValidChars string `json:"validChars,omitempty" yaml:"valid_chars,omitempty"` Variable string `json:"variable,omitempty" yaml:"variable,omitempty"` }
type QuestionClient ¶
type QuestionClient struct {
// contains filtered or unexported fields
}
func (*QuestionClient) Create ¶
func (c *QuestionClient) Create(container *Question) (*Question, error)
func (*QuestionClient) Delete ¶
func (c *QuestionClient) Delete(container *Question) error
func (*QuestionClient) List ¶
func (c *QuestionClient) List(opts *ListOpts) (*QuestionCollection, error)
type QuestionCollection ¶
type QuestionCollection struct { Collection Data []Question `json:"data,omitempty"` // contains filtered or unexported fields }
func (*QuestionCollection) Next ¶
func (cc *QuestionCollection) Next() (*QuestionCollection, error)
type QuestionOperations ¶
type RancherBaseClient ¶
type RancherBaseClient interface { Websocket(string, map[string][]string) (*websocket.Conn, *http.Response, error) List(string, *ListOpts, interface{}) error Post(string, interface{}, interface{}) error GetLink(Resource, string, interface{}) error Create(string, interface{}, interface{}) error Update(string, *Resource, interface{}, interface{}) error ById(string, string, interface{}) error Delete(*Resource) error Reload(*Resource, interface{}) error Action(string, string, *Resource, interface{}, interface{}) error GetOpts() *ClientOpts GetSchemas() *Schemas GetTypes() map[string]Schema SetCustomHeaders(headers map[string]string) // contains filtered or unexported methods }
type RancherBaseClientImpl ¶
type RancherBaseClientImpl struct { Opts *ClientOpts Schemas *Schemas Types map[string]Schema // contains filtered or unexported fields }
func (*RancherBaseClientImpl) Action ¶
func (rancherClient *RancherBaseClientImpl) Action(schemaType string, action string, existing *Resource, inputObject, respObject interface{}) error
func (*RancherBaseClientImpl) ById ¶
func (rancherClient *RancherBaseClientImpl) ById(schemaType string, id string, respObject interface{}) error
func (*RancherBaseClientImpl) Create ¶
func (rancherClient *RancherBaseClientImpl) Create(schemaType string, createObj interface{}, respObject interface{}) error
func (*RancherBaseClientImpl) Delete ¶
func (rancherClient *RancherBaseClientImpl) Delete(existing *Resource) error
func (*RancherBaseClientImpl) GetLink ¶
func (rancherClient *RancherBaseClientImpl) GetLink(resource Resource, link string, respObject interface{}) error
func (*RancherBaseClientImpl) GetOpts ¶
func (rancherClient *RancherBaseClientImpl) GetOpts() *ClientOpts
func (*RancherBaseClientImpl) GetSchemas ¶
func (rancherClient *RancherBaseClientImpl) GetSchemas() *Schemas
func (*RancherBaseClientImpl) GetTypes ¶
func (rancherClient *RancherBaseClientImpl) GetTypes() map[string]Schema
func (*RancherBaseClientImpl) List ¶
func (rancherClient *RancherBaseClientImpl) List(schemaType string, opts *ListOpts, respObject interface{}) error
func (*RancherBaseClientImpl) Post ¶
func (rancherClient *RancherBaseClientImpl) Post(url string, createObj interface{}, respObject interface{}) error
func (*RancherBaseClientImpl) Reload ¶
func (rancherClient *RancherBaseClientImpl) Reload(existing *Resource, output interface{}) error
func (*RancherBaseClientImpl) SetCustomHeaders ¶
func (rancherClient *RancherBaseClientImpl) SetCustomHeaders(headers map[string]string)
type RancherClient ¶
type RancherClient struct { RancherBaseClient ApiVersion ApiVersionOperations Catalog CatalogOperations Template TemplateOperations Question QuestionOperations TemplateVersion TemplateVersionOperations Error ErrorOperations }
func NewRancherClient ¶
func NewRancherClient(opts *ClientOpts) (*RancherClient, error)
type ResourceCollection ¶
type ResourceCollection struct { Collection Data []Resource `json:"data,omitempty"` }
type Schema ¶
type Schema struct { Resource PluralName string `json:"pluralName,omitempty"` ResourceMethods []string `json:"resourceMethods,omitempty"` ResourceFields map[string]Field `json:"resourceFields,omitempty"` ResourceActions map[string]Action `json:"resourceActions,omitempty"` CollectionMethods []string `json:"collectionMethods,omitempty"` CollectionFields map[string]Field `json:"collectionFields,omitempty"` CollectionActions map[string]Action `json:"collectionActions,omitempty"` CollectionFilters map[string]Filter `json:"collectionFilters,omitempty"` IncludeableLinks []string `json:"includeableLinks,omitempty"` }
type Schemas ¶
type Schemas struct { Collection Data []Schema `json:"data,omitempty"` // contains filtered or unexported fields }
type Template ¶
type Template struct { Resource `yaml:"-"` Actions map[string]string `json:"actions,omitempty" yaml:"actions,omitempty"` CatalogId string `json:"catalogId,omitempty" yaml:"catalog_id,omitempty"` Categories []string `json:"categories,omitempty" yaml:"categories,omitempty"` Category string `json:"category,omitempty" yaml:"category,omitempty"` DefaultTemplateVersionId string `json:"defaultTemplateVersionId,omitempty" yaml:"default_template_version_id,omitempty"` DefaultVersion string `json:"defaultVersion,omitempty" yaml:"default_version,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"` FolderName string `json:"folderName,omitempty" yaml:"folder_name,omitempty"` IconFilename string `json:"iconFilename,omitempty" yaml:"icon_filename,omitempty"` IsSystem string `json:"isSystem,omitempty" yaml:"is_system,omitempty"` Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` License string `json:"license,omitempty" yaml:"license,omitempty"` Links map[string]string `json:"links,omitempty" yaml:"links,omitempty"` Maintainer string `json:"maintainer,omitempty" yaml:"maintainer,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Path string `json:"path,omitempty" yaml:"path,omitempty"` TemplateBase string `json:"templateBase,omitempty" yaml:"template_base,omitempty"` Type string `json:"type,omitempty" yaml:"type,omitempty"` UpgradeFrom string `json:"upgradeFrom,omitempty" yaml:"upgrade_from,omitempty"` VersionLinks map[string]string `json:"versionLinks,omitempty" yaml:"version_links,omitempty"` Versions []string `json:"versions,omitempty" yaml:"versions,omitempty"` }
type TemplateClient ¶
type TemplateClient struct {
// contains filtered or unexported fields
}
func (*TemplateClient) Create ¶
func (c *TemplateClient) Create(container *Template) (*Template, error)
func (*TemplateClient) Delete ¶
func (c *TemplateClient) Delete(container *Template) error
func (*TemplateClient) List ¶
func (c *TemplateClient) List(opts *ListOpts) (*TemplateCollection, error)
type TemplateCollection ¶
type TemplateCollection struct { Collection Data []Template `json:"data,omitempty"` // contains filtered or unexported fields }
func (*TemplateCollection) Next ¶
func (cc *TemplateCollection) Next() (*TemplateCollection, error)
type TemplateOperations ¶
type TemplateVersion ¶
type TemplateVersion struct { Resource `yaml:"-"` Actions map[string]string `json:"actions,omitempty" yaml:"actions,omitempty"` Bindings map[string]string `json:"bindings,omitempty" yaml:"bindings,omitempty"` Files map[string]string `json:"files,omitempty" yaml:"files,omitempty"` Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` Links map[string]string `json:"links,omitempty" yaml:"links,omitempty"` MaximumRancherVersion string `json:"maximumRancherVersion,omitempty" yaml:"maximum_rancher_version,omitempty"` MinimumRancherVersion string `json:"minimumRancherVersion,omitempty" yaml:"minimum_rancher_version,omitempty"` Questions []Question `json:"questions,omitempty" yaml:"questions,omitempty"` TemplateId string `json:"templateId,omitempty" yaml:"template_id,omitempty"` Type string `json:"type,omitempty" yaml:"type,omitempty"` UpgradeFrom string `json:"upgradeFrom,omitempty" yaml:"upgrade_from,omitempty"` UpgradeVersionLinks map[string]string `json:"upgradeVersionLinks,omitempty" yaml:"upgrade_version_links,omitempty"` Version string `json:"version,omitempty" yaml:"version,omitempty"` }
type TemplateVersionClient ¶
type TemplateVersionClient struct {
// contains filtered or unexported fields
}
func (*TemplateVersionClient) ById ¶
func (c *TemplateVersionClient) ById(id string) (*TemplateVersion, error)
func (*TemplateVersionClient) Create ¶
func (c *TemplateVersionClient) Create(container *TemplateVersion) (*TemplateVersion, error)
func (*TemplateVersionClient) Delete ¶
func (c *TemplateVersionClient) Delete(container *TemplateVersion) error
func (*TemplateVersionClient) List ¶
func (c *TemplateVersionClient) List(opts *ListOpts) (*TemplateVersionCollection, error)
func (*TemplateVersionClient) Update ¶
func (c *TemplateVersionClient) Update(existing *TemplateVersion, updates interface{}) (*TemplateVersion, error)
type TemplateVersionCollection ¶
type TemplateVersionCollection struct { Collection Data []TemplateVersion `json:"data,omitempty"` // contains filtered or unexported fields }
func (*TemplateVersionCollection) Next ¶
func (cc *TemplateVersionCollection) Next() (*TemplateVersionCollection, error)
type TemplateVersionOperations ¶
type TemplateVersionOperations interface { List(opts *ListOpts) (*TemplateVersionCollection, error) Create(opts *TemplateVersion) (*TemplateVersion, error) Update(existing *TemplateVersion, updates interface{}) (*TemplateVersion, error) ById(id string) (*TemplateVersion, error) Delete(container *TemplateVersion) error }
Click to show internal directories.
Click to hide internal directories.