Documentation
¶
Index ¶
- Constants
- func DefaultConfigLocation() string
- type Client
- func (cl *Client) Build(guid string) (*a.Build, error)
- func (cl *Client) CreateProduction(name, title, summary string) (*a.Production, error)
- func (cl *Client) CreateResource(kind, rsrcGUID string, force bool, rsrc interface{}) (int, error)
- func (cl *Client) CreateToken(secret, realm, clientID, userID, scope string, duration int64) (string, error)
- func (cl *Client) DeleteResource(prod, kind, guid string) (int, error)
- func (cl *Client) GetResource(prod, kind, guid string, rsrc interface{}) error
- func (cl *Client) HasToken() error
- func (cl *Client) HasTokenAndGUID() error
- func (cl *Client) Productions() (*a.ProductionList, error)
- func (cl *Client) Resources(prod, kind string) (*a.ResourceList, error)
- func (cl *Client) SetProduction(guid string)
- func (cl *Client) Store(path string) error
- func (cl *Client) UpdateResource(kind, rsrcGUID string, force bool, rsrc interface{}) (int, error)
- func (cl *Client) Upload(path string, force bool) error
- func (cl *Client) Validate() error
Constants ¶
const (
// DefaultNamespacePrefix is the API's namespace
DefaultNamespacePrefix = "/a/v1"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigLocation ¶
func DefaultConfigLocation() string
DefaultConfigLocation returns the suggested default location for the config file
Types ¶
type Client ¶
type Client struct {
ServiceEndpoint string `json:"url" binding:"required"`
Token string `json:"token" binding:"required"`
GUID string `json:"guid" binding:"required"`
// contains filtered or unexported fields
}
Client is a client for interacting with the PodOps service.
Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines.
func NewClient ¶
NewClient creates a new podcast client.
Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines.
func NewClientFromFile ¶
NewClientFromFile creates a client by reading values from a file
Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines.
func (*Client) CreateProduction ¶
func (cl *Client) CreateProduction(name, title, summary string) (*a.Production, error)
CreateProduction invokes the CreateProductionEndpoint
func (*Client) CreateResource ¶
CreateResource invokes the ResourceEndpoint
func (*Client) CreateToken ¶
func (cl *Client) CreateToken(secret, realm, clientID, userID, scope string, duration int64) (string, error)
CreateToken creates an access token on the service FIXME this is not tested
func (*Client) DeleteResource ¶ added in v0.9.10
DeleteResource deletes a resources
func (*Client) GetResource ¶ added in v0.9.10
GetResource returns a resource file
func (*Client) HasTokenAndGUID ¶
HasTokenAndGUID verifies the presence of a token and GUID
func (*Client) Productions ¶
func (cl *Client) Productions() (*a.ProductionList, error)
Productions retrieves a list of productions
func (*Client) Resources ¶
func (cl *Client) Resources(prod, kind string) (*a.ResourceList, error)
Resources retrieves a list of resources
func (*Client) SetProduction ¶
SetProduction sets the context of further operations
func (*Client) UpdateResource ¶
UpdateResource invokes the ResourceEndpoint