Documentation
¶
Index ¶
- Constants
- type Client
- func (cl *Client) Build(guid string) (string, error)
- func (cl *Client) Close()
- func (cl *Client) CreateProduction(name, title, summary string) (*t.ProductionResponse, error)
- func (cl *Client) CreateResource(kind, guid string, force bool, rsrc interface{}) (int, error)
- func (cl *Client) Get(cmd string, response interface{}) (int, error)
- func (cl *Client) IsAuthorized() bool
- func (cl *Client) List() (*t.ProductionsResponse, error)
- func (cl *Client) Post(cmd string, request, response interface{}) (int, error)
- func (cl *Client) Put(cmd string, request, response interface{}) (int, error)
- func (cl *Client) Store(path string)
- func (cl *Client) UpdateResource(kind, guid string, force bool, rsrc interface{}) (int, error)
- func (cl *Client) Valid() error
- func (cl *Client) Validate() error
Constants ¶
const ( // DefaultServiceEndpoint is the service URL DefaultServiceEndpoint = "https://api.podops.dev" // DefaultNamespacePrefix is the API's namespace DefaultNamespacePrefix = "/a/v1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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) (*t.ProductionResponse, error)
CreateProduction invokes the CreateProductionEndpoint
func (*Client) CreateResource ¶
CreateResource invokes the ResourceEndpoint
func (*Client) IsAuthorized ¶
IsAuthorized does a quick verification
func (*Client) List ¶
func (cl *Client) List() (*t.ProductionsResponse, error)
List retrieves a list of resources
func (*Client) UpdateResource ¶
UpdateResource invokes the ResourceEndpoint