Documentation ¶
Index ¶
- type APIError
- type APIKeyParam
- type Changelog
- type Channel
- type Client
- type Component
- type ComponentItem
- type Dependencies
- type DiscoveryService
- func (s *DiscoveryService) ComponentsList(query string) (*ListItems, *http.Response, error)
- func (s *DiscoveryService) FlavorsList(pageParams *PaginationParams) (*Flavors, *http.Response, error)
- func (s *DiscoveryService) GetChangelogFrom(componentName string, rangeParam *RangeParams, pageParam *PaginationParams) (*Changelog, *http.Response, error)
- func (s *DiscoveryService) GetComponent(componentName string) (*Item, *http.Response, error)
- func (s *DiscoveryService) GetDependenciesFrom(componentName string) (*Dependencies, *http.Response, error)
- func (s *DiscoveryService) GetFlavorsFrom(componentName string, pageParams *PaginationParams) (*Flavors, *http.Response, error)
- func (s *DiscoveryService) OsesList(query string) (*ListItems, *http.Response, error)
- func (s *DiscoveryService) RuntimesList(query string) (*ListItems, *http.Response, error)
- func (s *DiscoveryService) ServicesList(query string) (*ListItems, *http.Response, error)
- type EmailNotifications
- type Flavors
- type HookParams
- type HooksList
- type HooksService
- func (s *HooksService) Delete(stackID string, hookID string) (*StatusDeletion, *http.Response, error)
- func (s *HooksService) List(stackID string, params *PaginationParams) (*HooksList, *http.Response, error)
- func (s *HooksService) Register(stackID string, params *HookParams) (*ResponseGeneration, *http.Response, error)
- func (s *HooksService) Test(stackID string, hookID string) (*TestHook, *http.Response, error)
- func (s *HooksService) Update(stackID string, hookID string, params *HookParams) (*ResponseGeneration, *http.Response, error)
- type Item
- type ListItems
- type PaginationParams
- type Query
- type RangeParams
- type ResponseGeneration
- type SlackChannels
- type Stack
- type StackDefinition
- type StackParams
- type StacksList
- type StacksService
- func (s *StacksService) Create(params *StackDefinition) (*StatusGeneration, *http.Response, error)
- func (s *StacksService) Delete(stackID string) (*StatusDeletion, *http.Response, error)
- func (s *StacksService) Get(stackID string) (*Stack, *http.Response, error)
- func (s *StacksService) GetVulnerabilities(stackID string, params *PaginationParams) (*Vulnerability, *http.Response, error)
- func (s *StacksService) List(params *PaginationParams) (*StacksList, *http.Response, error)
- func (s *StacksService) Regenerate(stackID string) (*StatusGeneration, *http.Response, error)
- func (s *StacksService) Update(stackID string, params *StackParams) (*StatusGeneration, *http.Response, error)
- type StatusDeletion
- type StatusGeneration
- type TestHook
- type UserService
- func (s *UserService) ListSlackChannels(params *PaginationParams) (*SlackChannels, *http.Response, error)
- func (s *UserService) RemoveSlackChannel(slackChannelID string) (*StatusDeletion, *http.Response, error)
- func (s *UserService) TestSlackIntegration(slackChannelID string) (*Channel, *http.Response, error)
- func (s *UserService) UpdateNotifications(params *EmailNotifications) (*EmailNotifications, *http.Response, error)
- type Vulnerability
- type VulnerabilityItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changelog ¶
type Changelog struct { TotalEntries int `json:"total_entries"` TotalPAges int `json:"total_pages"` Items []struct { Version string `json:"version"` Revision int `json:"revision"` Branch string `json:"branch"` Checksum string `json:"checksum"` PublishedAt string `json:"published_at"` ReleaseNotes string `json:"release_notes"` ReleaseNotesURL string `json:"release_notes_url"` } `json:"items"` }
Changelog ...
type Client ¶
type Client struct { Stacks *StacksService Hooks *HooksService Discovery *DiscoveryService User *UserService // contains filtered or unexported fields }
Client is a Stacksmith client for making Stacksmith API requests.
type Component ¶
type Component struct { ID string `json:"id"` Name string `json:"name"` Branch string `json:"branch"` Version string `json:"version"` Revision int `json:"revision"` Checksum string `json:"checksum"` Outdated bool `json:"outdated"` Category string `json:"category"` Latest struct { Version string `json:"version"` Revision int `json:"revision"` } `json:"latest"` Vulnerabilities struct { Vulnerable bool `json:"vulnerable"` Severity string `json:"severity"` Items []VulnerabilityItem `json:"items"` } `json:"vulnerabilities"` }
Component ...
type ComponentItem ¶
ComponentItem ...
type Dependencies ¶
type Dependencies struct { TotalEntries int `json:"total_entries"` TotalPages int `json:"total_pages"` Items []string `json:"items"` }
Dependencies ...
type DiscoveryService ¶
type DiscoveryService struct {
// contains filtered or unexported fields
}
DiscoveryService provides methods for accessing Stacksmith Discovery API endpoints.
func (*DiscoveryService) ComponentsList ¶
ComponentsList List all available components. https://stacksmith.bitnami.com/api/v1/#!/Discovery/get_components
func (*DiscoveryService) FlavorsList ¶
func (s *DiscoveryService) FlavorsList(pageParams *PaginationParams) (*Flavors, *http.Response, error)
FlavorsList List all available Flavors https://stacksmith.bitnami.com/api/v1/#!/Discovery/get_flavors
func (*DiscoveryService) GetChangelogFrom ¶
func (s *DiscoveryService) GetChangelogFrom(componentName string, rangeParam *RangeParams, pageParam *PaginationParams) (*Changelog, *http.Response, error)
GetChangelogFrom Retrieve the changelog for a component https://stacksmith.bitnami.com/api/v1/#!/Discovery/get_components_id_changelog
func (*DiscoveryService) GetComponent ¶
GetComponent Retrieve the properties from a components https://stacksmith.bitnami.com/api/v1/#!/Discovery/get_components_id
func (*DiscoveryService) GetDependenciesFrom ¶
func (s *DiscoveryService) GetDependenciesFrom(componentName string) (*Dependencies, *http.Response, error)
GetDependenciesFrom Retrieve the component ID of the component dependencies https://stacksmith.bitnami.com/api/v1/#!/Discovery/get_components_id_dependencies
func (*DiscoveryService) GetFlavorsFrom ¶
func (s *DiscoveryService) GetFlavorsFrom(componentName string, pageParams *PaginationParams) (*Flavors, *http.Response, error)
GetFlavorsFrom Retrieve the available kinds from a component https://stacksmith.bitnami.com/api/v1/#!/Discovery/get_components_id_flavors
func (*DiscoveryService) OsesList ¶
OsesList List all available OSes. https://stacksmith.bitnami.com/api/v1/#!/Discovery/get_oses
func (*DiscoveryService) RuntimesList ¶
RuntimesList List all available components in the runtimes category. https://stacksmith.bitnami.com/api/v1/#!/Discovery/get_runtimes
func (*DiscoveryService) ServicesList ¶
ServicesList List all available components in the services category. https://stacksmith.bitnami.com/api/v1/#!/Discovery/get_services
type EmailNotifications ¶
type EmailNotifications struct {
EmailNotificationsEnabled bool `json:"email_notifications_enabled"`
}
EmailNotifications ...
type Flavors ¶
type Flavors struct { TotalEntries int `json:"total_entries"` TotalPages int `json:"total_pages"` Items []struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Default bool `json:"default"` ComponentURL string `json:"component_url"` } `json:"items"` }
Flavors ...
type HooksList ¶
type HooksList struct { TotalEntries int `json:"total_entries"` TotalPages int `json:"total_pages"` Items []struct { ID string `json:"id"` URL string `json:"url"` } `json:"items"` }
HooksList ...
type HooksService ¶
type HooksService struct {
// contains filtered or unexported fields
}
HooksService provides methods for accessing Stacksmith Stack Hooks API endpoints.
func (*HooksService) Delete ¶
func (s *HooksService) Delete(stackID string, hookID string) (*StatusDeletion, *http.Response, error)
Delete Delete a hook https://stacksmith.bitnami.com/api/v1/#!/Stack_Hooks/delete_stacks_stack_id_hooks_id
func (*HooksService) List ¶
func (s *HooksService) List(stackID string, params *PaginationParams) (*HooksList, *http.Response, error)
List List all hooks for this stack. https://stacksmith.bitnami.com/api/v1/#!/Stack_Hooks/get_stacks_stack_id_hooks
func (*HooksService) Register ¶
func (s *HooksService) Register(stackID string, params *HookParams) (*ResponseGeneration, *http.Response, error)
Register Register a URL as a hook that will be triggered when there are updates for your stacks. https://stacksmith.bitnami.com/api/v1/#!/Stack_Hooks/post_stacks_stack_id_hooks
func (*HooksService) Test ¶
Test Send a test payload to the URL endpoint. https://stacksmith.bitnami.com/api/v1/#!/Stack_Hooks/post_stacks_stack_id_hooks_id_test
func (*HooksService) Update ¶
func (s *HooksService) Update(stackID string, hookID string, params *HookParams) (*ResponseGeneration, *http.Response, error)
Update Update the URL for a previously registered hook. https://stacksmith.bitnami.com/api/v1/#!/Stack_Hooks/patch_stacks_stack_id_hooks_id
type Item ¶
type Item struct { ID string `json:"id"` Name string `json:"name"` Category string `json:"category"` Versions []struct { Version string `json:"version"` Revision int `json:"revision"` Branch string `json:"branch"` Checksum string `json:"checksum"` PublishedAt string `json:"published_at"` } `json:"versions"` Prebuilt bool `json:"prebuilt"` ReleaseSeries []struct { Version string `json:"version"` Payload string `json:"payload"` } `json:"release_series"` DependenciesURL string `json:"dependencies_url"` }
Item ...
type PaginationParams ¶
type PaginationParams struct { Page int `url:"page,omitempty"` PerPage int `url:"per_page,omitempty"` }
PaginationParams ...
type RangeParams ¶
RangeParams ...
type ResponseGeneration ¶
ResponseGeneration ...
type SlackChannels ¶
type SlackChannels struct { TotalEntries int `json:"total_entries"` TotalPAges int `json:"total_pages"` Items []Channel `json:"items"` }
SlackChannels ...
type Stack ¶
type Stack struct { ID string `json:"id"` Name string `json:"name"` Status string `json:"status"` GeneratedAt string `json:"generated_at"` RegeneratedAt string `json:"regenerated_at"` Outdated bool `json:"outdated"` NotificationsEnabled bool `json:"notifications_enabled"` Requirements []struct { ID string `json:"id"` Version string `json:"version"` } `json:"requirements"` Vulnerabilities struct { URL string `json:"url"` Vulnerable bool `json:"vulnerable"` Severity string `json:"severity"` } `json:"vulnerabilities"` Flavor struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Default bool `json:"default"` ComponentURL string `json:"component_url"` } `json:"flavor"` Components []Component `json:"components"` Os Component `json:"os"` Output struct { Dockerfile string `json:"dockerfile"` } `json:"output"` }
Stack ...
type StackDefinition ¶
type StackDefinition struct { Name string `json:"name"` Components []ComponentItem `json:"components"` OS ComponentItem `json:"os"` Flavor string `json:"flavor"` }
StackDefinition ...
type StackParams ¶
type StackParams struct { Name string `json:"name"` NotificationsEnabled bool `json:"notifications_enabled"` }
StackParams ...
type StacksList ¶
type StacksList struct { TotalEntries int `json:"total_entries"` TotalPages int `json:"total_pages"` Items []struct { ID string `json:"id"` Name string `json:"name"` Status string `json:"status"` GeneratedAt string `json:"generated_at"` RegeneratedAt string `json:"regenerated_at"` Outdated bool `json:"outdated"` NotificationsEnabled bool `json:"notifications_enabled"` Vulnerabilities struct { URL string `json:"url"` Vulnerable bool `json:"vulnerable"` Severity string `json:"severity"` } `json:"vulnerabilities"` Output struct { Dockerfile string `json:"dockerfile"` } `json:"output"` Shared bool `json:"shared"` ShareableURL string `json:"shareable_url"` } `json:"items"` }
StacksList ...
type StacksService ¶
type StacksService struct {
// contains filtered or unexported fields
}
StacksService provides methods for accessing Stacksmith Stacks API endpoints.
func (*StacksService) Create ¶
func (s *StacksService) Create(params *StackDefinition) (*StatusGeneration, *http.Response, error)
Create Create a stack by specifying the components you need, its kind and its OS. https://stacksmith.bitnami.com/api/v1/#!/Stacks/post_stacks
func (*StacksService) Delete ¶
func (s *StacksService) Delete(stackID string) (*StatusDeletion, *http.Response, error)
Delete Delete a stack. https://stacksmith.bitnami.com/api/v1/#!/Stacks/delete_stacks_id
func (*StacksService) Get ¶
Get Retrieve the properties of a stack, to list the versions of the framework, runtime, and OS generated. https://stacksmith.bitnami.com/api/v1/#!/Stacks/get_stacks_id
func (*StacksService) GetVulnerabilities ¶
func (s *StacksService) GetVulnerabilities(stackID string, params *PaginationParams) (*Vulnerability, *http.Response, error)
GetVulnerabilities Retrieve the list of vulnerabilities affecting a stack. https://stacksmith.bitnami.com/api/v1/#!/Stacks/get_stacks_id_vulnerabilities
func (*StacksService) List ¶
func (s *StacksService) List(params *PaginationParams) (*StacksList, *http.Response, error)
List List all stacks attached to your account. https://stacksmith.bitnami.com/api/v1/#!/Stacks/get_stacks
func (*StacksService) Regenerate ¶
func (s *StacksService) Regenerate(stackID string) (*StatusGeneration, *http.Response, error)
Regenerate Create a new stack based on the requirements of another, if there are new versions for it's requirements. https://stacksmith.bitnami.com/api/v1/#!/Stacks/post_stacks_id_regenerate
func (*StacksService) Update ¶
func (s *StacksService) Update(stackID string, params *StackParams) (*StatusGeneration, *http.Response, error)
Update Update the properties of an existing stack. https://stacksmith.bitnami.com/api/v1/#!/Stacks/patch_stacks_id
type StatusDeletion ¶
StatusDeletion ...
type StatusGeneration ¶
StatusGeneration ...
type TestHook ¶
type TestHook struct { ID string `json:"id"` Result struct { Request struct { URL string `json:"url"` Body string `json:"body"` } `json:"request"` } `json:"result"` Response struct { Code string `json:"code"` Body string `json:"body"` Message string `json:"message"` } }
TestHook ...
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
UserService provides methods for accessing Stacksmith User API endpoints.
func (*UserService) ListSlackChannels ¶
func (s *UserService) ListSlackChannels(params *PaginationParams) (*SlackChannels, *http.Response, error)
ListSlackChannels List all slack channels you have added integrations to. https://stacksmith.bitnami.com/api/v1/#!/User/get_user_slack_channels
func (*UserService) RemoveSlackChannel ¶
func (s *UserService) RemoveSlackChannel(slackChannelID string) (*StatusDeletion, *http.Response, error)
RemoveSlackChannel Remove a Slack channel integration. https://stacksmith.bitnami.com/api/v1/#!/User/delete_user_slack_channels_id
func (*UserService) TestSlackIntegration ¶
TestSlackIntegration Send a test notification to a Slack channel. https://stacksmith.bitnami.com/api/v1/#!/User/post_user_slack_channels_id_test
func (*UserService) UpdateNotifications ¶
func (s *UserService) UpdateNotifications(params *EmailNotifications) (*EmailNotifications, *http.Response, error)
UpdateNotifications Update your email notification settings https://stacksmith.bitnami.com/api/v1/#!/User/patch_user
type Vulnerability ¶
type Vulnerability struct { TotalEntries int `json:"total_entries"` TotalPages int `json:"total_pages"` Items []VulnerabilityItem `json:"items"` }
Vulnerability ...