Documentation ¶
Index ¶
- type Client
- func (c *Client) Connect() error
- func (c *Client) Disconnect() error
- func (c *Client) GetAllSubscriptions(id string) ([]Subscription, error)
- func (c *Client) GetCVEDatabase(subscription, dtrSchema string) error
- func (c *Client) GetLicense(subscription string) error
- func (c *Client) GetUserInfo(user string) error
- func (c *Client) WriteToken() error
- type Subscription
- type UserAccount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Username string Password string STOREURL string HUBURL string IgnoreCert bool Token string ID string }
Client - Is the basic Client struct
func NewBasicAuthClient ¶
NewBasicAuthClient - Creates a basic client to connecto the UCP
func (*Client) GetAllSubscriptions ¶
func (c *Client) GetAllSubscriptions(id string) ([]Subscription, error)
GetAllSubscriptions - Retrieves all subscriptions
func (*Client) GetCVEDatabase ¶
GetCVEDatabase - Retrieves CVE Database
func (*Client) GetLicense ¶
GetLicense - Retrieves all subscriptions
func (*Client) GetUserInfo ¶
GetUserInfo - Retrieves all subscriptions
func (*Client) WriteToken ¶
WriteToken - Writes a copy of the token to the
type Subscription ¶
type Subscription struct { Name string `json:"name"` SubscriptionID string `json:"subscription_id"` DockerID string `json:"docker_id"` ProductID string `json:"product_id"` CreatedByDockerID string `json:"created_by_docker_id"` ProductRatePlan string `json:"product_rate_plan"` ProductRatePlanID string `json:"product_rate_plan_id"` InitialPeriodStart time.Time `json:"initial_period_start"` CurrentPeriodStart time.Time `json:"current_period_start"` CurrentPeriodEnd time.Time `json:"current_period_end"` State string `json:"state"` Eusa struct { Accepted bool `json:"accepted"` AcceptedBy string `json:"accepted_by"` AcceptedOn time.Time `json:"accepted_on"` } `json:"eusa"` PricingComponents []struct { Name string `json:"name"` Value int `json:"value"` } `json:"pricing_components"` MarketingOptIn bool `json:"marketing_opt_in"` }
Subscription - this is the returned struct from a store query
type UserAccount ¶
type UserAccount struct { ID string `json:"id"` Username string `json:"username"` FullName string `json:"full_name"` Location string `json:"location"` Company string `json:"company"` URL string `json:"profile_url"` Type string `json:"type"` }
UserAccount - The struct that is returned by interacting with the Docker Store
Click to show internal directories.
Click to hide internal directories.