Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateGlobalInitScript(ctx context.Context, req CreateGlobalInitScriptRequest, opts ...call.Option) (*CreateGlobalInitScriptResponse, error)
- func (c *Client) DeleteGlobalInitScript(ctx context.Context, req DeleteGlobalInitScriptRequest, opts ...call.Option) (*DeleteGlobalInitScriptResponse, error)
- func (c *Client) GetGlobalInitScript(ctx context.Context, req GetGlobalInitScriptRequest, opts ...call.Option) (*GlobalInitScriptDetails, error)
- func (c *Client) ListGlobalInitScripts(ctx context.Context, req ListGlobalInitScriptsRequest, opts ...call.Option) (*ListGlobalInitScriptsResponse, error)
- func (c *Client) UpdateGlobalInitScript(ctx context.Context, req UpdateGlobalInitScriptRequest, opts ...call.Option) (*UpdateGlobalInitScriptResponse, error)
- type CreateGlobalInitScriptRequest
- type CreateGlobalInitScriptResponse
- type DeleteGlobalInitScriptRequest
- type DeleteGlobalInitScriptResponse
- type GetGlobalInitScriptRequest
- type GlobalInitScriptDetails
- type ListGlobalInitScriptsRequest
- type ListGlobalInitScriptsResponse
- type UpdateGlobalInitScriptRequest
- type UpdateGlobalInitScriptResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateGlobalInitScript ¶
func (c *Client) CreateGlobalInitScript(ctx context.Context, req CreateGlobalInitScriptRequest, opts ...call.Option) (*CreateGlobalInitScriptResponse, error)
Creates a new global init script in this workspace.
func (*Client) DeleteGlobalInitScript ¶
func (c *Client) DeleteGlobalInitScript(ctx context.Context, req DeleteGlobalInitScriptRequest, opts ...call.Option) (*DeleteGlobalInitScriptResponse, error)
Deletes a global init script.
func (*Client) GetGlobalInitScript ¶
func (c *Client) GetGlobalInitScript(ctx context.Context, req GetGlobalInitScriptRequest, opts ...call.Option) (*GlobalInitScriptDetails, error)
Gets all the details of a script, including its Base64-encoded contents.
func (*Client) ListGlobalInitScripts ¶
func (c *Client) ListGlobalInitScripts(ctx context.Context, req ListGlobalInitScriptsRequest, opts ...call.Option) (*ListGlobalInitScriptsResponse, error)
Get a list of all global init scripts for this workspace. This returns all properties for each script but **not** the script contents. To retrieve the contents of a script, use the [get a global init script](:method:globalinitscripts/get) operation.
func (*Client) UpdateGlobalInitScript ¶
func (c *Client) UpdateGlobalInitScript(ctx context.Context, req UpdateGlobalInitScriptRequest, opts ...call.Option) (*UpdateGlobalInitScriptResponse, error)
Updates a global init script, specifying only the fields to change. All fields are optional. Unspecified fields retain their current value.
type CreateGlobalInitScriptRequest ¶
type CreateGlobalInitScriptRequest struct {
// The name of the script
Name *string
// The Base64-encoded content of the script.
Script []byte
// The position of a global init script, where 0 represents the first script to
// run, 1 is the second script to run, in ascending order.
//
// If you omit the numeric position for a new global init script, it defaults to
// last position. It will run after all current scripts. Setting any value
// greater than the position of the last script is equivalent to the last
// position. Example: Take three existing scripts with positions 0, 1, and 2.
// Any position of (3) or greater puts the script in the last position. If an
// explicit position value conflicts with an existing script value, your request
// succeeds, but the original script at that position and all later scripts have
// their positions incremented by 1.
Position *int
// Specifies whether the script is enabled. The script runs only if enabled.
Enabled *bool
}
type CreateGlobalInitScriptResponse ¶
type CreateGlobalInitScriptResponse struct {
// The global init script ID.
ScriptId *string
}
type DeleteGlobalInitScriptRequest ¶
type DeleteGlobalInitScriptRequest struct {
// The ID of the global init script.
ScriptId *string
}
type DeleteGlobalInitScriptResponse ¶
type DeleteGlobalInitScriptResponse struct {
}
type GetGlobalInitScriptRequest ¶
type GetGlobalInitScriptRequest struct {
// The ID of the global init script.
ScriptId *string
}
type GlobalInitScriptDetails ¶
type GlobalInitScriptDetails struct {
// The global init script ID.
ScriptId *string
// The name of the script
Name *string
// The position of a script, where 0 represents the first script to run, 1 is
// the second script to run, in ascending order.
Position *int
// Specifies whether the script is enabled. The script runs only if enabled.
Enabled *bool
// The username of the user who created the script.
CreatedBy *string
// Time when the script was created, represented as a Unix timestamp in
// milliseconds.
CreatedAt *int64
// The username of the user who last updated the script
UpdatedBy *string
// Time when the script was updated, represented as a Unix timestamp in
// milliseconds.
UpdatedAt *int64
}
type ListGlobalInitScriptsRequest ¶
type ListGlobalInitScriptsRequest struct {
}
type ListGlobalInitScriptsResponse ¶
type ListGlobalInitScriptsResponse struct {
Scripts []GlobalInitScriptDetails
}
type UpdateGlobalInitScriptRequest ¶
type UpdateGlobalInitScriptRequest struct {
// The ID of the global init script.
ScriptId *string
// The name of the script
Name *string
// The Base64-encoded content of the script.
Script []byte
// The position of a script, where 0 represents the first script to run, 1 is
// the second script to run, in ascending order. To move the script to run
// first, set its position to 0.
//
// To move the script to the end, set its position to any value greater or equal
// to the position of the last script. Example, three existing scripts with
// positions 0, 1, and 2. Any position value of 2 or greater puts the script in
// the last position (2).
//
// If an explicit position value conflicts with an existing script, your request
// succeeds, but the original script at that position and all later scripts have
// their positions incremented by 1.
Position *int
// Specifies whether the script is enabled. The script runs only if enabled.
Enabled *bool
}
type UpdateGlobalInitScriptResponse ¶
type UpdateGlobalInitScriptResponse struct {
}
Click to show internal directories.
Click to hide internal directories.