Documentation
¶
Overview ¶
Package client implements a small Airlock Digital REST API client.
Index ¶
- func BoolInt(v bool) string
- func IntString(v int64) string
- func Values(kv ...string) url.Values
- type APIError
- type Client
- func (c *Client) AddApplicationHash(ctx context.Context, applicationID string, hashes []string) error
- func (c *Client) AddBaselineHash(ctx context.Context, baselineID string, hashes []string) error
- func (c *Client) AddBlocklistHash(ctx context.Context, hashes []string) error
- func (c *Client) AddGroupPath(ctx context.Context, groupID, path, comment string) error
- func (c *Client) AddGroupProcess(ctx context.Context, groupID, process, typ, comment string) error
- func (c *Client) AddGroupPublisher(ctx context.Context, groupID, publisher, comment string) error
- func (c *Client) AddHash(ctx context.Context, sha256, path string) error
- func (c *Client) CreateApplication(ctx context.Context, name, version, categoryID string) (string, error)
- func (c *Client) CreateApplicationCategory(ctx context.Context, name, parentID string) (string, error)
- func (c *Client) CreateBaseline(ctx context.Context, name string) (string, error)
- func (c *Client) CreateBlocklist(ctx context.Context, name string) (string, error)
- func (c *Client) CreateGroup(ctx context.Context, name, parent string, hidden bool) (string, error)
- func (c *Client) DeleteApplication(ctx context.Context, id string) error
- func (c *Client) DeleteApplicationCategory(ctx context.Context, id string) error
- func (c *Client) DeleteBaseline(ctx context.Context, id string) error
- func (c *Client) DeleteBlocklist(ctx context.Context, id string) error
- func (c *Client) DeleteGroup(ctx context.Context, id string) error
- func (c *Client) GetGroupPolicy(ctx context.Context, groupID string) (*Policy, error)
- func (c *Client) ListAgents(ctx context.Context) ([]Named, error)
- func (c *Client) ListApplicationCategories(ctx context.Context) ([]Named, error)
- func (c *Client) ListApplications(ctx context.Context) ([]Named, error)
- func (c *Client) ListBaselines(ctx context.Context) ([]Named, error)
- func (c *Client) ListBlocklists(ctx context.Context) ([]Named, error)
- func (c *Client) ListGroups(ctx context.Context) ([]Named, error)
- func (c *Client) Post(ctx context.Context, path string, params url.Values, body any, out any) error
- func (c *Client) RemoveApplicationHash(ctx context.Context, applicationID string, hashes []string) error
- func (c *Client) RemoveBaselineHash(ctx context.Context, baselineID string, hashes []string) error
- func (c *Client) RemoveBlocklistHash(ctx context.Context, hashes []string) error
- func (c *Client) RemoveGroupPath(ctx context.Context, groupID, path string) error
- func (c *Client) RemoveGroupProcess(ctx context.Context, groupID, process, typ string) error
- func (c *Client) RemoveGroupPublisher(ctx context.Context, groupID, publisher string) error
- func (c *Client) SetGroupApplication(ctx context.Context, groupID, applicationID string, approved bool) error
- func (c *Client) SetGroupBaseline(ctx context.Context, groupID, baselineID string, approved bool) error
- func (c *Client) SetGroupBlocklist(ctx context.Context, groupID, blocklistID string, approved bool, audit bool) error
- type Config
- type Named
- type Policy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIError ¶
APIError is returned for non-successful Airlock API calls. Response bodies are not included because they may contain environment data.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client talks to the Airlock Digital REST API.
func (*Client) AddApplicationHash ¶
func (*Client) AddBaselineHash ¶
func (*Client) AddBlocklistHash ¶
func (*Client) AddGroupPath ¶
func (*Client) AddGroupProcess ¶
func (*Client) AddGroupPublisher ¶
func (*Client) CreateApplication ¶
func (*Client) CreateApplicationCategory ¶
func (*Client) CreateBaseline ¶
func (*Client) CreateBlocklist ¶
func (*Client) CreateGroup ¶
func (*Client) DeleteApplication ¶
func (*Client) DeleteApplicationCategory ¶
func (*Client) DeleteBaseline ¶
func (*Client) DeleteBlocklist ¶
func (*Client) GetGroupPolicy ¶
func (*Client) ListApplicationCategories ¶
func (*Client) ListApplications ¶
func (*Client) ListBlocklists ¶
func (*Client) Post ¶
Post sends Airlock's POST-style API request. Parameters are encoded as query parameters unless body is non-nil.
func (*Client) RemoveApplicationHash ¶
func (*Client) RemoveBaselineHash ¶
func (*Client) RemoveBlocklistHash ¶
func (*Client) RemoveGroupPath ¶
func (*Client) RemoveGroupProcess ¶
func (*Client) RemoveGroupPublisher ¶
func (*Client) SetGroupApplication ¶
func (*Client) SetGroupBaseline ¶
type Config ¶
type Config struct {
URL string
APIKey string
Insecure bool
UserAgent string
Timeout time.Duration
}
Config holds Airlock client configuration.
Click to show internal directories.
Click to hide internal directories.