Documentation ¶
Index ¶
- type CreateEnvironmentRequest
- type CreateEnvironmentResponse
- type Environment
- type EnvironmentsService
- func (s *EnvironmentsService) CreateEnvironment(ctx context.Context, request *CreateEnvironmentRequest) (*CreateEnvironmentResponse, *http.Response, error)
- func (s *EnvironmentsService) DeleteEnvironment(ctx context.Context, environmentID string) (*http.Response, error)
- func (s *EnvironmentsService) GetEnvironment(ctx context.Context, environmentID string) (*Environment, *http.Response, error)
- func (s *EnvironmentsService) ListEnvironments(ctx context.Context) ([]Environment, *http.Response, error)
- func (s *EnvironmentsService) ModifyEnvironment(ctx context.Context, environmentID string, request *ModifyEnvironmentRequest) (*http.Response, error)
- type ModifyEnvironmentRequest
- type TargetSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateEnvironmentRequest ¶
type CreateEnvironmentRequest struct { Name string `json:"name"` Description string `json:"description,omitempty"` // OfflineCleanupTimeoutHours is the amount of time (in hours) to wait until // offline targets are automatically removed by BastionZero. OfflineCleanupTimeoutHours uint `json:"offlineCleanupTimeoutHours"` }
CreateEnvironmentRequest is used to create a new environment
type CreateEnvironmentResponse ¶
type CreateEnvironmentResponse struct {
ID string `json:"id"`
}
CreateEnvironmentResponse is the response returned if an environment is successfully created
type Environment ¶
type Environment struct { ID string `json:"id"` OrganizationID string `json:"organizationId"` IsDefault bool `json:"isDefault"` Name string `json:"name"` Description string `json:"description"` TimeCreated types.Timestamp `json:"timeCreated"` OfflineCleanupTimeoutHours uint `json:"offlineCleanupTimeoutHours"` Targets []TargetSummary `json:"targets"` }
Environment is a collection of targets
type EnvironmentsService ¶
EnvironmentsService handles communication with the environments endpoints of the BastionZero API.
BastionZero API docs: https://cloud.bastionzero.com/api/#tag--Environments
func (*EnvironmentsService) CreateEnvironment ¶
func (s *EnvironmentsService) CreateEnvironment(ctx context.Context, request *CreateEnvironmentRequest) (*CreateEnvironmentResponse, *http.Response, error)
CreateEnvironment creates a new environment.
BastionZero API docs: https://cloud.bastionzero.com/api/#post-/api/v2/environments
func (*EnvironmentsService) DeleteEnvironment ¶
func (s *EnvironmentsService) DeleteEnvironment(ctx context.Context, environmentID string) (*http.Response, error)
DeleteEnvironment deletes the specified environment.
BastionZero API docs: https://cloud.bastionzero.com/api/#delete-/api/v2/environments/-id-
func (*EnvironmentsService) GetEnvironment ¶
func (s *EnvironmentsService) GetEnvironment(ctx context.Context, environmentID string) (*Environment, *http.Response, error)
GetEnvironment fetches the specified environment.
BastionZero API docs: https://cloud.bastionzero.com/api/#get-/api/v2/environments/-id-
func (*EnvironmentsService) ListEnvironments ¶
func (s *EnvironmentsService) ListEnvironments(ctx context.Context) ([]Environment, *http.Response, error)
ListEnvironments lists all environments.
BastionZero API docs: https://cloud.bastionzero.com/api/#get-/api/v2/environments
func (*EnvironmentsService) ModifyEnvironment ¶
func (s *EnvironmentsService) ModifyEnvironment(ctx context.Context, environmentID string, request *ModifyEnvironmentRequest) (*http.Response, error)
ModifyEnvironment updates an environment.
BastionZero API docs: https://cloud.bastionzero.com/api/#patch-/api/v2/environments/-id-
type ModifyEnvironmentRequest ¶
type ModifyEnvironmentRequest struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` // OfflineCleanupTimeoutHours is the amount of time (in hours) to wait until // offline targets are automatically removed by BastionZero. OfflineCleanupTimeoutHours *uint `json:"offlineCleanupTimeoutHours,omitempty"` }
ModifyEnvironmentRequest is used to modify an environment
type TargetSummary ¶
type TargetSummary struct { ID string `json:"id"` Type targettype.TargetType `json:"targetType"` }
TargetSummary describes a target associated with an environment