linker

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	URL           string `json:"url"`
	LoginProvider `json:"login_provider"`
}

Link is the request sent to the /cluster/v1/links endpoint to link the cluster handled by the client to a cluster using its id, name, url, and login provider.

func (*Link) ToCluster

func (l *Link) ToCluster() *config.Cluster

ToCluster converts a link to a config.Cluster.

type Linker

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

Linker manages DC/OS cluster links.

func New

func New(baseClient *httpclient.Client, logger *logrus.Logger) *Linker

New creates a new cluster linker client from a standard HTTP client.

func (l *Linker) Link(link *Link) error

Link sends a link request to /cluster/v1/links using a given client.

func (l *Linker) Links() ([]*Link, error)

Links returns the links of a cluster.

func (l *Linker) Unlink(id string) error

Unlink sends an unlink request to /cluster/v1/links.

type Links struct {
	Links []*Link `json:"links"`
}

Links is the structure returned by the /cluster/v1/links endpoint.

type LoginProvider

type LoginProvider struct {
	ID   string `json:"id"`
	Type string `json:"type"`
}

LoginProvider representing a part of the message when sending a link request, it gives information about the cluster to link to.

Jump to

Keyboard shortcuts

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