persistence

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckTypeLink struct {
	Self string `json:"self"`
}

CheckTypeLink handy struct for unmarshal the checktype create response from persistence.

type Checktype

type Checktype struct {
	Name         string   `json:"name"`
	Description  string   `json:"description"`
	Timeout      int      `json:"timeout,omitempty"`
	Image        string   `json:"image"`
	Options      string   `json:"options,omitempty"`
	RequiredVars []string `json:"required_vars"`
	QueueName    string   `json:"queue_name,omitempty"`
	Assets       []string `json:"assets"`
}

Checktype defines the data needed to publish a new Check.

type Client

type Client interface {
	PublishChecktype(Checktype) (*PublishChecktypeResult, error)
}

Client used to interface with the persistence service.

func NewClient

func NewClient(endPointURL string) Client

NewClient creates a new client for a given end point.

type PublishChecktypeResult

type PublishChecktypeResult struct {
	ID           string        `json:"id"`
	Name         string        `json:"name"`
	Description  string        `json:"description"`
	Timeout      int           `json:"timeout"`
	Enabled      bool          `json:"enabled"`
	Options      interface{}   `json:"options"`
	RequiredVars []string      `json:"required_vars"`
	QueueName    string        `json:"queue_name,omitempty"`
	Image        string        `json:"image"`
	Links        CheckTypeLink `json:"links"`
	Assets       []string      `json:"assets"`
}

PublishChecktypeResult information returned by the persistence service after a new checktype has added.

type PublishChecktypeResultMsg

type PublishChecktypeResultMsg struct {
	Checktype PublishChecktypeResult `json:"checktype"`
}

PublishChecktypeResultMsg contains the data returned after a successful call to PublishChecktype

Jump to

Keyboard shortcuts

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