maintenance

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	For5Minutes  TimeType = "for-5-minutes"
	For30Minutes TimeType = "for-30-minutes"
	For1Hour     TimeType = "for-1-hour"
	Indefinitely TimeType = "indefinitely"
	Schedule     TimeType = "schedule"

	Integration RuleEntityType = "integration"
	Policy      RuleEntityType = "policy"

	Enabled  RuleState = "enabled"
	Disabled RuleState = "disabled"

	All        StatusType = "all"
	NonExpired StatusType = "non-expired"
	Past       StatusType = "past"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelRequest

type CancelRequest struct {
	client.BaseRequest
	Id string
}

func (*CancelRequest) Method

func (r *CancelRequest) Method() string

func (*CancelRequest) ResourcePath

func (r *CancelRequest) ResourcePath() string

func (*CancelRequest) Validate

func (r *CancelRequest) Validate() error

type ChangeEndDateRequest

type ChangeEndDateRequest struct {
	client.BaseRequest
	Id      string
	EndDate *time.Time `json:"endDate"`
}

func (*ChangeEndDateRequest) Method

func (r *ChangeEndDateRequest) Method() string

func (*ChangeEndDateRequest) ResourcePath

func (r *ChangeEndDateRequest) ResourcePath() string

func (*ChangeEndDateRequest) Validate

func (r *ChangeEndDateRequest) Validate() error

type ChangeEndDateResult

type ChangeEndDateResult struct {
	client.ResultMetadata
	Maintenance
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *client.Config) (*Client, error)

func (*Client) Cancel

func (c *Client) Cancel(context context.Context, request *CancelRequest) (*CloseResult, error)

func (*Client) ChangeEndDate

func (c *Client) ChangeEndDate(context context.Context, request *ChangeEndDateRequest) (*ChangeEndDateResult, error)

func (*Client) Create

func (c *Client) Create(context context.Context, request *CreateRequest) (*CreateResult, error)

func (*Client) Delete

func (c *Client) Delete(context context.Context, request *DeleteRequest) (*DeleteResult, error)

func (*Client) Get

func (c *Client) Get(context context.Context, request *GetRequest) (*GetResult, error)

func (*Client) List

func (c *Client) List(context context.Context, request *ListRequest) (*ListResult, error)

func (*Client) Update

func (c *Client) Update(context context.Context, request *UpdateRequest) (*UpdateResult, error)

type CloseResult

type CloseResult struct {
	client.ResultMetadata
	Result string `json:"result"`
}

type CreateRequest

type CreateRequest struct {
	client.BaseRequest
	Description string `json:"description"`
	Time        Time   `json:"time"`
	Rules       []Rule `json:"rules"`
}

func (*CreateRequest) Method

func (r *CreateRequest) Method() string

func (*CreateRequest) ResourcePath

func (r *CreateRequest) ResourcePath() string

func (*CreateRequest) Validate

func (r *CreateRequest) Validate() error

type CreateResult

type CreateResult struct {
	client.ResultMetadata
	Maintenance
}

type DeleteRequest

type DeleteRequest struct {
	client.BaseRequest
	Id string
}

func (*DeleteRequest) Method

func (r *DeleteRequest) Method() string

func (*DeleteRequest) ResourcePath

func (r *DeleteRequest) ResourcePath() string

func (*DeleteRequest) Validate

func (r *DeleteRequest) Validate() error

type DeleteResult

type DeleteResult struct {
	client.ResultMetadata
	Result string `json:"result"`
}

type Entity

type Entity struct {
	Id   string         `json:"id"`
	Type RuleEntityType `json:"type"`
}

type GetRequest

type GetRequest struct {
	client.BaseRequest
	Id string
}

func (*GetRequest) Method

func (r *GetRequest) Method() string

func (*GetRequest) ResourcePath

func (r *GetRequest) ResourcePath() string

func (*GetRequest) Validate

func (r *GetRequest) Validate() error

type GetResult

type GetResult struct {
	client.ResultMetadata
	Id          string `json:"id"`
	Status      string `json:"status"`
	Time        Time   `json:"time"`
	Description string `json:"description"`
	Results     []Rule `json:"rules"`
}

type ListRequest

type ListRequest struct {
	client.BaseRequest
	Type StatusType
}

func (*ListRequest) Method

func (r *ListRequest) Method() string

func (*ListRequest) ResourcePath

func (r *ListRequest) ResourcePath() string

func (*ListRequest) Validate

func (r *ListRequest) Validate() error

type ListResult

type ListResult struct {
	client.ResultMetadata
	Maintenances []Maintenance `json:"data"`
}

type Maintenance

type Maintenance struct {
	Id          string `json:"id"`
	Status      string `json:"status"`
	Time        Time   `json:"time"`
	Description string `json:"description"`
}

type Rule

type Rule struct {
	State  RuleState `json:"state"`
	Entity Entity    `json:"entity"`
}

type RuleEntityType

type RuleEntityType string

type RuleState

type RuleState string

type StatusType

type StatusType string

type Time

type Time struct {
	Type      TimeType   `json:"type"`
	StartDate *time.Time `json:"startDate,omitempty"`
	EndDate   *time.Time `json:"endDate,omitempty"`
}

type TimeType

type TimeType string

type UpdateRequest

type UpdateRequest struct {
	client.BaseRequest
	Id          string
	Description string `json:"description"`
	Time        Time   `json:"time"`
	Rules       []Rule `json:"rules"`
}

func (*UpdateRequest) Method

func (r *UpdateRequest) Method() string

func (*UpdateRequest) ResourcePath

func (r *UpdateRequest) ResourcePath() string

func (*UpdateRequest) Validate

func (r *UpdateRequest) Validate() error

type UpdateResult

type UpdateResult struct {
	client.ResultMetadata
	Maintenance
}

Jump to

Keyboard shortcuts

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