...

Package common

import "golang.conradwood.net/go-easyops/common"
Overview
Index

Overview ▾

commonly used by other go-easyops packages. May provide useful information on the state of go-easyops.

func AddBlockedServiceName

func AddBlockedServiceName(s string)

mark a service as blocked by name

func AddExportedServiceName

func AddExportedServiceName(name string)

mark a service as exported.

func AddRegistryChangeReceiver

func AddRegistryChangeReceiver(f func())

func AddServiceName

func AddServiceName(s string)

add a service name to the list of services being used

func GetCloudName

func GetCloudName() string

return the name of the cloud we are connected to

func GetPublicSigningKey

func GetPublicSigningKey() *pb.KeyResponse

func GetText

func GetText() map[string]string

func NotifyRegistryChangeListeners

func NotifyRegistryChangeListeners()

func RegisterInfoProvider

func RegisterInfoProvider(name string, ip func() []*InfoValue)

func RemoveBlockedServiceName

func RemoveBlockedServiceName(s string)

unmark a service as blocked by name

func SetPublicSigningKey

func SetPublicSigningKey(k *pb.KeyResponse)

func SignAllbytes

func SignAllbytes(in *pb.User) []byte

get all the bytes from a proto that ought to be signed

func VerifyBytes

func VerifyBytes(b []byte, signature []byte) bool

func VerifySignature

func VerifySignature(u *pb.User) bool

user has 2 signatures, one for the ID only and one "full" over all fields. this one verifies the "full" signature (e.g. true indicates that the all fields in the user object have been created by a 'real' auth-service and can be trusted)

func VerifySignedUser

func VerifySignedUser(u *pb.SignedUser) *pb.User

check signature from signed user, and if valid return user. otherwise nil

type BlockedService

type BlockedService struct {
    Name    string
    Counter int
}

func GetBlockedConnectionNames

func GetBlockedConnectionNames() []*BlockedService

get services that are used, but are currently blocked because no targets are available

type InfoValue

type InfoValue struct {
    Name  string
    Value float64
}

type Service

type Service struct {
    Name string
}

func GetConnectionNames

func GetConnectionNames() []*Service

get all services used