Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Add(ctx context.Context, pkg Package) error
- func (c *Client) Get(ctx context.Context, name string) (Package, error)
- func (c *Client) Info(ctx context.Context) (Info, error)
- func (c *Client) Remove(ctx context.Context, pkg Package) error
- func (c *Client) Update(ctx context.Context, pkg Package) error
- type ClientOption
- type Info
- type Package
Constants ¶
View Source
const ( DefaultServer = "https://gpm.jolheiser.com" TokenHeader = "X-GPM-Token" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a gpm client
func (*Client) Add ¶
Add adds a new Package to a gpm server
func (*Client) Get ¶
Get gets a Package from a server
func (*Client) Info ¶
Info gets Info from a gpm server
func (*Client) Remove ¶
Remove removes a Package from a gpm server
type ClientOption ¶
type ClientOption func(*Client)
ClientOption is an option for a Client
func WithHTTP ¶
func WithHTTP(client *http.Client) ClientOption
WithHTTP sets the http.Client for a Client
func WithServer ¶
func WithServer(server string) ClientOption
WithServer sets the gpm server for a Client
Click to show internal directories.
Click to hide internal directories.