client

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountResponse

type AccountResponse struct {
	ID              int  `json:"id"`
	ParentAccountID *int `json:"parent_account_id"`
}

type Client

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

func NewBasicAuthClient

func NewBasicAuthClient(ctx context.Context, user string, password string) (Client, error)

func (Client) CreateGroup

func (c Client) CreateGroup(ctx context.Context, req Group) (int, error)

func (Client) CreateNotificationAddress

func (c Client) CreateNotificationAddress(ctx context.Context, req NotificationAddress) (int, error)

func (Client) CreateService

func (c Client) CreateService(ctx context.Context, req Service) (int, error)

func (Client) DeleteGroup

func (c Client) DeleteGroup(ctx context.Context, id int) error

func (Client) DeleteNotificationAddress

func (c Client) DeleteNotificationAddress(ctx context.Context, id int) error

func (Client) DeleteService

func (c Client) DeleteService(ctx context.Context, id int) error

func (Client) OwnerID

func (c Client) OwnerID() int

func (Client) ReadGroup

func (c Client) ReadGroup(ctx context.Context, id int) (Group, error)

func (Client) ReadNotificationAddress

func (c Client) ReadNotificationAddress(ctx context.Context, id int) (NotificationAddress, error)

func (Client) ReadService

func (c Client) ReadService(ctx context.Context, id int) (Service, error)

func (Client) UpdateGroup

func (c Client) UpdateGroup(ctx context.Context, id int, req Group) error

func (Client) UpdateNotificationAddress

func (c Client) UpdateNotificationAddress(ctx context.Context, id int, req NotificationAddress) error

func (Client) UpdateService

func (c Client) UpdateService(ctx context.Context, id int, req Service) error

type CreateGroupResponse

type CreateGroupResponse struct {
	ID int `json:"id"`
}

type CreateNotificationAddressResponse

type CreateNotificationAddressResponse struct {
	ID int `json:"id"`
}

type CreateServiceResponse

type CreateServiceResponse struct {
	ID int `json:"id"`
}

type Group

type Group struct {
	Name    string `json:"name"`
	OwnerID int    `json:"owner_id"`
}

type NotificationAddress

type NotificationAddress struct {
	Address               string `json:"address"`
	NotificationChannelID string `json:"notification_channel_id"`
	GroupID               int    `json:"group_id,omitempty"`
	Description           string `json:"description,omitempty"`
	OwnerID               int    `json:"owner_id"`
}

type ResourceNotFound added in v0.1.4

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

func (ResourceNotFound) Error added in v0.1.4

func (r ResourceNotFound) Error() string

type Service

type Service struct {
	TypeID                     string                  `json:"type_id"`
	Name                       string                  `json:"name"`
	Address                    string                  `json:"address"`
	GroupID                    int                     `json:"group_id,omitempty"`
	Interval                   int                     `json:"interval"`
	Description                *string                 `json:"description,omitempty"`
	IsActive                   *bool                   `json:"is_active,omitempty"`
	NotificationChannelIDs     *[]string               `json:"notification_channel_ids,omitempty"`
	NotificationConditionIDs   *[]string               `json:"notification_condition_ids,omitempty"`
	NotificationModeID         *string                 `json:"notification_mode_id,omitempty"`
	RecoveryNotificationModeID *string                 `json:"recovery_notification_mode_id,omitempty"`
	ExtendedSettings           *map[string]interface{} `json:"extended_settings,omitempty"`
	OwnerID                    int                     `json:"owner_id"`
}

Jump to

Keyboard shortcuts

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