maintenance

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func NewAPI

func NewAPI(client HttpClient, taskWaiter TaskWaiter, logger Log) *API

func (*API) Get

func (a *API) Get(ctx context.Context, subscription int) (*Maintenance, error)

Get will retrieve a subscription's maintenance detail

func (*API) Update

func (a *API) Update(ctx context.Context, subscription int, m Maintenance) error

Update will update a subscription's maintenance detail

type HttpClient

type HttpClient interface {
	Get(ctx context.Context, name, path string, responseBody interface{}) error
	Put(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error
}

type Log

type Log interface {
	Printf(format string, args ...interface{})
}

type Maintenance

type Maintenance struct {
	Mode    *string   `json:"mode,omitempty"`
	Windows []*Window `json:"windows,omitempty"`
}

func (Maintenance) String

func (o Maintenance) String() string

type NotFound

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

func (*NotFound) Error

func (f *NotFound) Error() string

type TaskWaiter

type TaskWaiter interface {
	Wait(ctx context.Context, id string) error
}

type Window

type Window struct {
	StartHour       *int      `json:"startHour,omitempty"`
	DurationInHours *int      `json:"durationInHours,omitempty"`
	Days            []*string `json:"days,omitempty"`
}

func (Window) String

func (o Window) String() string

Jump to

Keyboard shortcuts

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