domain

package
v0.0.0-...-6fc2dc1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterMembers

type ClusterMembers struct {
	Header  Header    `json:"header"`
	Members []Members `json:"members"`
}

ClusterMembers struct

type Header struct {
	ClusterID int64 `json:"cluster_id"`
	MemberID  int64 `json:"member_id"`
	RaftTerm  int   `json:"raft_term"`
}

Header of ClusterMembers

type Members

type Members struct {
	ID         int64    `json:"ID"`
	Name       string   `json:"name"`
	PeerURLs   []string `json:"peerURLs"`
	ClientURLs []string `json:"clientURLs"`
}

Members of ClusterMembers

type Payload

type Payload struct {
	Username string `json:"username"`
}

Payload struct

type SensuRepository

type SensuRepository interface {
	appcontext.Component
	SensuBackendHealth(sensuurl string) bool
	SensuVersion(sensuurl string, version string) bool
	GetSensuAPIToken(sensuurl string) string
	CreateOperatorUserGetToken(sensuurl string) string
	GetOperatorUserSensuAPIToken(sensuurl string) string
	SensuTestToken(sensuurl string, token string) bool
	GetClusterID(sensuurl string, token string) string
	CheckMemberExist(sensuurl string, token string, member string) bool
	AddNewMember(sensuurl string, token string, member string) error
	RemoveMember(sensuurl string, token string, member string) error
	CheckResourceExist(sensuurl string, token string, resource string, namespace string, name string) bool
	AddResource(sensuurl string, token string, resource string, namespace string, bodymarshal []byte) error
	DeleteResource(sensuurl string, token string, namespace string, resource string, name string) error
}

SensuRepository interface

func GetSensuRepository

func GetSensuRepository() SensuRepository

GetSensuRepository func return SensuRepository interface

Jump to

Keyboard shortcuts

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