policy

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CreateAppliedPolicy(ctx context.Context, p *appliedpolicy.CreatePayload) (*appliedpolicy.AppliedPolicy, error)
	DeleteAppliedPolicy(ctx context.Context, id string) error
	ShowAppliedPolicy(ctx context.Context, id string, view string) (*appliedpolicy.AppliedPolicy, error)
	IndexAppliedPolicies(ctx context.Context, names []string, view, etag string) (*appliedpolicy.AppliedPolicyList, error)
	ShowAppliedPolicyLog(ctx context.Context, id string, etag string) (*appliedpolicy.AppliedPolicyLog, error)
	ShowAppliedPolicyStatus(ctx context.Context, id string) (*appliedpolicy.AppliedPolicyStatus, error)

	ShowIncident(ctx context.Context, id string, view string) (*incident.Incident, error)
	IndexIncidents(ctx context.Context, appliedPolicyID string, state []string, view string, etag string) (*incident.IncidentList, error)
	IndexEscalations(ctx context.Context, id string) (*incident.Escalations, error)

	CompilePolicyTemplate(ctx context.Context, filename string, source string) error
	UploadPolicyTemplate(ctx context.Context, filename string, source string) (*policytemplate.PolicyTemplate, error)
	UpdatePolicyTemplate(ctx context.Context, id, filename string, source string) (*policytemplate.PolicyTemplate, error)
	ShowPolicyTemplate(ctx context.Context, id string, view string) (*policytemplate.PolicyTemplate, error)
	RetrieveData(ctx context.Context, templateID string, names []string, options []*policytemplate.ConfigurationOptionCreateType, credentials map[string]string) ([]*policytemplate.Data, error)
	DeletePolicyTemplate(ctx context.Context, id string) error
}

Client is a thin wrapper around the generated front service clients in the sdk.

func NewClient

func NewClient(host string, projectID uint, ts auth.TokenSource, debug bool) Client

NewClient returns a new client for RightScale Policy service.

host should be the API host, such as governance-3.rightscale.com

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL