v2

package module
v2.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 33 Imported by: 39

Documentation

Index

Constants

View Source
const (
	// CheckRequestType is the message type string for check request.
	CheckRequestType = "check_request"

	// ChecksResource is the name of this resource type
	ChecksResource = "checks"

	// DefaultSplayCoverage is the default splay coverage for proxy check requests
	DefaultSplayCoverage = 90.0

	// NagiosOutputMetricFormat is the accepted string to represent the output metric format of
	// Nagios Perf Data
	NagiosOutputMetricFormat = "nagios_perfdata"

	// GraphiteOutputMetricFormat is the accepted string to represent the output metric format of
	// Graphite Plain Text
	GraphiteOutputMetricFormat = "graphite_plaintext"

	// OpenTSDBOutputMetricFormat is the accepted string to represent the output metric format of
	// OpenTSDB Line
	OpenTSDBOutputMetricFormat = "opentsdb_line"

	// InfluxDBOutputMetricFormat is the accepted string to represent the output metric format of
	// InfluxDB Line
	InfluxDBOutputMetricFormat = "influxdb_line"

	// PrometheusOutputMetricFormat is the accepted string to represent the output metric format of
	// Prometheus Exposition Text Format
	PrometheusOutputMetricFormat = "prometheus_text"

	// KeepaliveCheckName is the name of the check that is created when a
	// keepalive timeout occurs.
	KeepaliveCheckName = "keepalive"

	// RegistrationCheckName is the name of the check that is created when an
	// entity sends a keepalive and the entity does not yet exist in the store.
	RegistrationCheckName = "registration"

	// BackendCheckName is the name fo the check that is created when a backend
	// event is generated from an error.
	BackendCheckName = "backend"

	// MemoryScheduler indicates that a check is scheduled in-memory.
	MemoryScheduler = "memory"

	// EtcdScheduler indicates that a check is scheduled with etcd leases and
	// watchers.
	EtcdScheduler = "etcd"

	// PostgresScheduler indicates that a check is scheduled with postgresql,
	// using transactions and asynchronous notification (NOTIFY).
	PostgresScheduler = "postgres"
)
View Source
const (
	// AccessTokenString is the key name used to retrieve the access token string
	AccessTokenString key = iota

	// AccessTokenClaims contains the key name to retrieve the access token claims
	AccessTokenClaims

	// ClaimsKey contains key name to retrieve the jwt claims from context
	ClaimsKey

	// NamespaceKey contains the key name to retrieve the namespace from context
	NamespaceKey

	// RefreshTokenClaims contains the key name to retrieve the refresh token claims
	RefreshTokenClaims

	// RefreshTokenString contains the key name to retrieve the refresh token string
	RefreshTokenString

	// AuthorizationAttributesKey is the key name used to store authorization
	// attributes extracted from a request
	AuthorizationAttributesKey

	// StoreKey contains the key name to retrieve the etcd store from within a context
	StoreKey

	// PageContinueKey contains the continue token used in pagination
	PageContinueKey

	// PageSizeKey contains the page size used in pagination
	PageSizeKey

	// PipelineKey contains the key name to retrieve the pipeline from context
	PipelineKey

	// PipelineWorkflowKey contains the key name to retrieve the pipeline workflow from context
	PipelineWorkflowKey
)
View Source
const (
	// APIGroupName is the group name for this API
	APIGroupName = "core"

	// APIVersion is the version for this API
	APIVersion = "v2"
)
View Source
const (
	// CoreEdition represents the Sensu Core Edition (CE)
	// <DEPRECATED>
	CoreEdition = "core"

	// EditionHeader represents the HTTP header containing the edition value
	// <DEPRECATED>
	EditionHeader = "Sensu-Edition"
)
View Source
const (
	// EntitiesResource is the name of this resource type
	EntitiesResource = "entities"

	// EntityAgentClass is the name of the class given to agent entities.
	EntityAgentClass = "agent"

	// EntityProxyClass is the name of the class given to proxy entities.
	EntityProxyClass = "proxy"

	// EntityBackendClass is the name of the class given to backend entities.
	EntityBackendClass = "backend"

	// EntityServiceClass is the name of the class given to BSM service entities.
	EntityServiceClass = "service"

	// Redacted is filled in for fields that contain sensitive information
	Redacted = "REDACTED"
)
View Source
const (
	EntitySortName     = "NAME"
	EntitySortLastSeen = "LAST_SEEN"
)
View Source
const (
	// EventsResource is the name of this resource type
	EventsResource = "events"

	// EventFailingState indicates failing check result status
	EventFailingState = "failing"

	// EventFlappingState indicates a rapid change in check result status
	EventFlappingState = "flapping"

	// EventPassingState indicates successful check result status
	EventPassingState = "passing"
)
View Source
const (
	EventSortEntity    = "ENTITY"
	EventSortLastOk    = "LASTOK"
	EventSortSeverity  = "SEVERITY"
	EventSortTimestamp = "TIMESTAMP"
)
View Source
const (
	// EventFiltersResource is the name of this resource type
	EventFiltersResource = "filters"

	// EventFilterActionAllow is an action to allow events to pass through to the pipeline
	EventFilterActionAllow = "allow"

	// EventFilterActionDeny is an action to deny events from passing through to the pipeline
	EventFilterActionDeny = "deny"

	// DefaultEventFilterAction is the default action for filters
	DefaultEventFilterAction = EventFilterActionAllow
)
View Source
const (
	// HandlersResource is the name of this resource type
	HandlersResource = "handlers"

	// HandlerPipeType represents handlers that pipes event data // into arbitrary
	// commands via STDIN
	HandlerPipeType = "pipe"

	// HandlerSetType represents handlers that groups event handlers, making it
	// easy to manage groups of actions that should be executed for certain types
	// of events.
	HandlerSetType = "set"

	// HandlerTCPType represents handlers that send event data to a remote TCP
	// socket
	HandlerTCPType = "tcp"

	// HandlerUDPType represents handlers that send event data to a remote UDP
	// socket
	HandlerUDPType = "udp"

	// KeepaliveHandlerName is the name of the handler that is executed when
	// a keepalive timeout occurs.
	KeepaliveHandlerName = "keepalive"

	// RegistrationHandlerName is the name of the handler that is executed when
	// a registration event is passed to pipelined.
	RegistrationHandlerName = "registration"
)
View Source
const (
	// HooksResource is the name of this resource type
	HooksResource = "hooks"

	// HookRequestType is the message type string for hook request.
	HookRequestType = "hook_request"
)
View Source
const (
	JavascriptMutator = "javascript"
	PipeMutator       = "pipe"
)
View Source
const (
	// NamespaceTypeAll represents an empty namespace, used to represent a request
	// across all namespaces
	NamespaceTypeAll = ""

	// NamespacesResource is the name of this resource type
	NamespacesResource = "namespaces"
)
View Source
const (
	// ClusterRolesResource is the name of this resource type
	ClusterRolesResource = "clusterroles"

	// ClusterRoleBindingsResource is the name of this resource type
	ClusterRoleBindingsResource = "clusterrolebindings"

	// RolesResource is the name of this resource type
	RolesResource = "roles"

	// RoleBindingsResource is the name of this resource type
	RoleBindingsResource = "rolebindings"

	// ResourceAll represents all possible resources
	ResourceAll = "*"
	// VerbAll represents all possible verbs
	VerbAll = "*"

	// GroupType represents a group object in a subject
	GroupType = "Group"
	// UserType represents a user object in a subject
	UserType = "User"

	// ClusterRoleType represents a ClusterRole in a RoleRef
	ClusterRoleType = "ClusterRole"
	// RoleType represents a Role in a RoleRef
	RoleType = "Role"

	// LocalSelfUserResource represents a local user trying to view itself
	// or change its password
	LocalSelfUserResource = "localselfuser"
)
View Source
const (
	CheckStatusOk       = uint32(0)
	CheckStatusWarning  = uint32(1)
	CheckStatusCritical = uint32(2)

	CheckStatusCaptionOk       = "ok"
	CheckStatusCaptionWarning  = "warning"
	CheckStatusCaptionCritical = "critical"
	CheckStatusCaptionUnknown  = "unknown"
)
View Source
const (

	// LowerBound is the minimum interval that tessen will phone home, in seconds
	LowerBound = 60

	// UpperBound is the maximum interval that tessen will phone home, in seconds
	UpperBound = 21600

	// DefaultTessenInterval is the default interval at which tessen will phone home, in seconds
	DefaultTessenInterval = 1800

	// TessenResource is the name of this resource type
	TessenResource = "tessen"
)
View Source
const (
	RepeatPeriodAnnually   = "annually"
	RepeatPeriodMonthly    = "monthly"
	RepeatPeriodWeekly     = "weekly"
	RepeatPeriodWeekdays   = "weekdays"
	RepeatPeriodWeekends   = "weekends"
	RepeatPeriodDaily      = "daily"
	RepeatPeriodSundays    = "sundays"
	RepeatPeriodMondays    = "mondays"
	RepeatPeriodTuesdays   = "tuesdays"
	RepeatPeriodWednesdays = "wednesdays"
	RepeatPeriodThursdays  = "thursdays"
	RepeatPeriodFridays    = "fridays"
	RepeatPeriodSaturdays  = "saturdays"
)
View Source
const (
	// APIKeysResource is the name of this resource type.
	APIKeysResource = "apikeys"
)
View Source
const AgentHandshakeType = "agent_handshake"

AgentHandshakeType is the message type string for an AgentHandshake

View Source
const (
	// AssetsResource is the name of this resource type
	AssetsResource = "assets"
)
View Source
const BackendHandshakeType = "backend_handshake"

BackendHandshakeType is the message type string for a BackendHandshake

View Source
const DefaultKeepaliveTimeout = 120

DefaultKeepaliveTimeout specifies the default keepalive timeout

View Source
const (
	// ExtensionsResource is the name of this resource type
	ExtensionsResource = "extensions"
)
View Source
const (
	// ManagedByLabel is used to identify which client was used to create/update a
	// resource
	ManagedByLabel = "sensu.io/managed_by"
)
View Source
const (
	// MutatorsResource is the name of this resource type
	MutatorsResource = "mutators"
)
View Source
const PaginationContinueHeader = "Sensu-Continue"

PaginationContinueHeader is the name of the header used by the API to return a potential continue token when paginating.

View Source
const (
	// PipelinesResource is the name of this resource type
	PipelinesResource = "pipelines"
)
View Source
const (
	// SilencedResource is the name of this resource type
	SilencedResource = "silenced"
)
View Source
const (
	// UsersResource is the name of this resource type
	UsersResource = "users"
)

Variables

View Source
var (
	ErrInvalidLengthAdhoc        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAdhoc          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAdhoc = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthAny        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAny          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAny = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthApikey        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowApikey          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupApikey = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// AssetNameRegexStr used to validate name of asset
	AssetNameRegexStr = `[\w\/\_\.\-\:]+`

	// AssetNameRegex used to validate name of asset
	AssetNameRegex = regexp.MustCompile("^" + AssetNameRegexStr + "$")
)
View Source
var (
	ErrInvalidLengthAsset        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAsset          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAsset = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthAuthentication        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAuthentication          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAuthentication = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthCheck        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCheck          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCheck = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthEntity        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEntity          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEntity = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthEvent        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvent          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthExtension        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowExtension          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupExtension = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthFilter        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFilter          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupFilter = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthHandler        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHandler          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupHandler = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// CheckHookRegexStr used to validate type of check hook
	CheckHookRegexStr = `([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])`

	// CheckHookRegex used to validate type of check hook
	CheckHookRegex = regexp.MustCompile("^" + CheckHookRegexStr + "$")

	// Severities used to validate type of check hook
	Severities = []string{"ok", "warning", "critical", "unknown", "non-zero"}
)
View Source
var (
	ErrInvalidLengthHook        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHook          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupHook = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthKeepalive        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowKeepalive          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupKeepalive = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthMeta        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMeta          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMeta = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthMetricThreshold        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetricThreshold          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMetricThreshold = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthMetrics        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetrics          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMetrics = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthMutator        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMutator          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMutator = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthNamespace        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowNamespace          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupNamespace = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthPipeline        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPipeline          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPipeline = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthPipelineWorkflow        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPipelineWorkflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPipelineWorkflow = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthRbac        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRbac          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRbac = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthResourceReference        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowResourceReference          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupResourceReference = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthSecret        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSecret          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSecret = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthSilenced        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSilenced          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSilenced = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTessen        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTessen          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTessen = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTimeWindow        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTimeWindow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTimeWindow = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTls        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTls          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTls = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidToken = errors.New("invalid access or refresh token")
	ErrUnauthorized = errors.New("unauthorized")
)
View Source
var (
	ErrInvalidLengthUser        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowUser          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupUser = fmt.Errorf("proto: unexpected end of group")
)
View Source
var CommonCoreResources = []string{
	"assets",
	"checks",
	"entities",
	"events",
	"filters",
	"handlers",
	"hooks",
	"mutators",
	"silenced",
}

CommonCoreResources represents the common "core" resources found in a namespace

View Source
var (

	// DefaultCipherSuites overrides the default cipher suites in order to disable
	// CBC suites (Lucky13 attack) this means TLS 1.1 can't work (no GCM)
	// additionally, we should only use perfect forward secrecy ciphers
	DefaultCipherSuites = []uint16{

		tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
		tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
		tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
		tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,

		tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
		tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
	}
)
View Source
var DefaultRedactFields = []string{"password", "passwd", "pass", "api_key",
	"api_token", "access_key", "secret_key", "private_key", "secret"}

DefaultRedactFields contains the default fields to redact

View Source
var (
	// EventFilterAllActions is a list of actions that can be used by filters
	EventFilterAllActions = []string{
		EventFilterActionAllow,
		EventFilterActionDeny,
	}
)
View Source
var NameRegex = regexp.MustCompile(`\A[\w\.\-\:]+\z`)

NameRegex is used to validate the name of a resource

OutputMetricFormats represents all the accepted output_metric_format's a check can have

View Source
var StrictNameRegex = regexp.MustCompile(`\A[a-z0-9\_\.\-]+\z`)

StrictNameRegex is used to validate names of resources using a strict subset of charset.

View Source
var SubscriptionNameRegex = regexp.MustCompile(`\A[\w\.\-]+(\:?[\w\.\-]+)?\z`)

SubscriptionNameRegex is used to validate the name of a subscription, which can contain a single ":" character in case of an entity subscription (e.g. entity:foo)

View Source
var URLPrefix = path.Join("/api", APIGroupName, APIVersion)

URLPrefix is the URL prefix of this API

Functions

func APIKeyFields

func APIKeyFields(r Resource) map[string]string

APIKeyFields returns a set of fields that represent that resource.

func AddEntitySubscription

func AddEntitySubscription(entityName string, subscriptions []string) []string

AddEntitySubscription appends the entity subscription (using the format "entity:entityName") to the subscriptions of an entity

func AddValidPipelineWorkflowFilterReference

func AddValidPipelineWorkflowFilterReference(ref ResourceReference)

AddValidPipelineWorkflowFilterReference adds a ResourceReference to the list of valid resource references for filters. Only the APIVersion and Type fields are used to validate resource references at this time.

func AddValidPipelineWorkflowHandlerReference

func AddValidPipelineWorkflowHandlerReference(ref ResourceReference)

AddValidPipelineWorkflowHandlerReference adds a ResourceReference to the list of valid resource references for handlers. Only the APIVersion and Type fields are used to validate resource references at this time.

func AddValidPipelineWorkflowMutatorReference

func AddValidPipelineWorkflowMutatorReference(ref ResourceReference)

AddValidPipelineWorkflowMutatorReference adds a ResourceReference to the list of valid resource references for mutators. Only the APIVersion and Type fields are used to validate resource references at this time.

func AssetFields

func AssetFields(r Resource) map[string]string

AssetFields returns a set of fields that represent that resource

func CheckConfigFields

func CheckConfigFields(r Resource) map[string]string

CheckConfigFields returns a set of fields that represent that resource

func CheckStatusToCaption

func CheckStatusToCaption(status uint32) string

func ClusterRoleBindingFields

func ClusterRoleBindingFields(r Resource) map[string]string

ClusterRoleBindingFields returns a set of fields that represent that resource

func ClusterRoleFields

func ClusterRoleFields(r Resource) map[string]string

ClusterRoleFields returns a set of fields that represent that resource

func ContextNamespace

func ContextNamespace(ctx context.Context) string

ContextNamespace returns the namespace injected in the context

func ContextPipeline

func ContextPipeline(ctx context.Context) string

ContextPipeline returns the pipeline injected in the context

func ContextPipelineWorkflow

func ContextPipelineWorkflow(ctx context.Context) string

ContextPipelineWorkflow returns the pipeline workflow injected in the context

func EntityFields

func EntityFields(r Resource) map[string]string

EntityFields returns a set of fields that represent that resource

func EnvVarsToMap

func EnvVarsToMap(vars []string) map[string]string

EnvVarsToMap converts a list of FOO=BAR key-value pairs into a map.

func EventFields

func EventFields(r Resource) map[string]string

EventFields returns a set of fields that represent that resource

func EventFilterFields

func EventFilterFields(r Resource) map[string]string

EventFilterFields returns a set of fields that represent that resource

func EventsByEntityName

func EventsByEntityName(es []*Event, asc bool) sort.Interface

EventsByEntityName can be used to sort a given collection of events by entity name (and secondarily by check name.)

func EventsByLastOk

func EventsByLastOk(es []*Event, asc bool) sort.Interface

EventsByLastOk can be used to sort a given collection of events by time it last received an OK status.

func EventsBySeverity

func EventsBySeverity(es []*Event, asc bool) sort.Interface

EventsBySeverity can be used to sort a given collection of events by check status and timestamp.

func EventsByTimestamp

func EventsByTimestamp(es []*Event, asc bool) sort.Interface

EventsByTimestamp can be used to sort a given collection of events by time it occurred.

func ExtensionFields

func ExtensionFields(r Resource) map[string]string

ExtensionFields returns a set of fields that represent that resource

func GetEntitySubscription

func GetEntitySubscription(entityName string) string

GetEntitySubscription returns the entity subscription, using the format "entity:entityName"

func HandlerFields

func HandlerFields(r Resource) map[string]string

HandlerFields returns a set of fields that represent that resource

func HookConfigFields

func HookConfigFields(r Resource) map[string]string

HookConfigFields returns a set of fields that represent that resource

func LoadCACerts

func LoadCACerts(path string) (*x509.CertPool, error)

LoadCACerts takes the path to a certificate bundle file in PEM format and try to create a x509.CertPool out of it.

func MutatorFields

func MutatorFields(r Resource) map[string]string

MutatorFields returns a set of fields that represent that resource

func NamespaceFields

func NamespaceFields(r Resource) map[string]string

NamespaceFields returns a set of fields that represent that resource

func PageContinueFromContext

func PageContinueFromContext(ctx context.Context) string

PageContinueFromContext returns the continue token stored in the given context, if any. Returns "" if none is found.

func PageSizeFromContext

func PageSizeFromContext(ctx context.Context) int

PageSizeFromContext returns the page size stored in the given context, if any. Returns 0 if none is found, typically meaning "unlimited" page size.

func PipelineFields

func PipelineFields(r Resource) map[string]string

PipelineFields returns a set of fields that represent that resource.

func RoleBindingFields

func RoleBindingFields(r Resource) map[string]string

RoleBindingFields returns a set of fields that represent that resource

func RoleFields

func RoleFields(r Resource) map[string]string

RoleFields returns a set of fields that represent that resource

func SetContextFromResource

func SetContextFromResource(ctx context.Context, r MultitenantResource) context.Context

SetContextFromResource takes a context and a multi-tenant resource, adds the namespace to the context, and returns the udpated context

func SilencedFields

func SilencedFields(r Resource) map[string]string

SilencedFields returns a set of fields that represent that resource

func SilencedName

func SilencedName(subscription, check string) (string, error)

SilencedName returns the canonical name for a silenced entry. It returns non-nil error if both subscription and check are empty strings.

func SortCheckConfigsByName

func SortCheckConfigsByName(es []*CheckConfig, asc bool) sort.Interface

SortCheckConfigsByName can be used to sort a given collection of checks by their names.

func SortCheckConfigsByPredicate

func SortCheckConfigsByPredicate(cs []*CheckConfig, fn cmpCheckConfig) sort.Interface

SortCheckConfigsByPredicate can be used to sort a given collection using a given predicate.

func SortEntities

func SortEntities(entities []*Entity, ordering string, desc bool)

func SortEntitiesByID

func SortEntitiesByID(es []*Entity, asc bool) sort.Interface

SortEntitiesByID can be used to sort a given collection of entities by their IDs.

func SortEntitiesByLastSeen

func SortEntitiesByLastSeen(es []*Entity, asc bool) sort.Interface

SortEntitiesByLastSeen can be used to sort a given collection of entities by last time each was seen.

func SortEntitiesByPredicate

func SortEntitiesByPredicate(es []*Entity, fn func(a, b *Entity) bool) sort.Interface

SortEntitiesByPredicate can be used to sort a given collection using a given predicate.

func SortEventFiltersByName

func SortEventFiltersByName(ef []*EventFilter, asc bool) sort.Interface

SortEventFiltersByName can be used to sort a given collection of event filter by their names.

func SortEventFiltersByPredicate

func SortEventFiltersByPredicate(ef []*EventFilter, fn cmpEventFilter) sort.Interface

SortEventFiltersByPredicate can be used to sort a given collection using a given predicate.

func SortEvents

func SortEvents(events []*Event, ordering string, descending bool)

func SortHandlersByName

func SortHandlersByName(hs []*Handler, asc bool) sort.Interface

SortHandlersByName is used to sort a given collection of handlers by their names.

func SortHandlersByPredicate

func SortHandlersByPredicate(hs []*Handler, fn cmpHandler) sort.Interface

SortHandlersByPredicate is used to sort a given collection using a given predicate.

func SortMutatorsByName

func SortMutatorsByName(hs []*Mutator, asc bool) sort.Interface

SortMutatorsByName is used to sort a given collection of mutators by their names.

func SortMutatorsByPredicate

func SortMutatorsByPredicate(hs []*Mutator, fn cmpMutator) sort.Interface

SortMutatorsByPredicate is used to sort a given collection using a given predicate.

func SortSilencedByBegin

func SortSilencedByBegin(es []*Silenced) sort.Interface

SortSilencedByBegin can be used to sort a given collection by their begin timestamp.

func SortSilencedByExpireAt added in v2.16.1

func SortSilencedByExpireAt(es []*Silenced) sort.Interface

SortSilencedByExpireAt sorts silences by expiration timestamp where silences with expiration of 0 could never expire and are weighed heaviest, slightly less so if set to expire on resolve

func SortSilencedByName

func SortSilencedByName(es []*Silenced) sort.Interface

SortSilencedByName can be used to sort a given collection by their names.

func SortSilencedByPredicate

func SortSilencedByPredicate(es []*Silenced, fn func(a, b *Silenced) bool) sort.Interface

SortSilencedByPredicate can be used to sort a given collection using a given predicate.

func StandardClaims

func StandardClaims(subject string) jwt.StandardClaims

StandardClaims returns an initialized jwt.StandardClaims with the subject

func UserFields

func UserFields(r Resource) map[string]string

UserFields returns a set of fields that represent that resource

func ValidateAssetName

func ValidateAssetName(name string) error

ValidateAssetName validates that asset's name is valid

func ValidateEnvVars

func ValidateEnvVars(vars []string) error

ValidateEnvVars ensures that all the environment variables are well-formed. Vars should be of the form FOO=BAR.

func ValidateInterval

func ValidateInterval(freq uint32) error

ValidateInterval returns an error if the tessen interval is not within the upper and lower bound limits

func ValidateName

func ValidateName(name string) error

ValidateName validates the name of an element so it's not empty and it does not contains specical characters. Compatible with Sensu 1.0.

func ValidateNameStrict

func ValidateNameStrict(name string) error

ValidateNameStrict validates the name of an element so it's not empty and it does not contains specical characters. Not compatible with Sensu 1.0 resources.

func ValidateOutputMetricFormat

func ValidateOutputMetricFormat(format string) error

ValidateOutputMetricFormat returns an error if the string is not a valid metric format

func ValidateRoleRef

func ValidateRoleRef(roleRef *RoleRef) error

ValidateRoleRef checks that the role reference has a valid reference to either a Role or a ClusterRole

func ValidateSubdues

func ValidateSubdues(subdues []*TimeWindowRepeated) error

func ValidateSubscriptionName

func ValidateSubscriptionName(name string) error

ValidateSubscriptionName validates the name of a subscription so it's not empty and it does not contains special characters except for an optional ":"

Types

type APIKey

type APIKey struct {
	// Metadata contains the name, namespace (N/A), labels and annotations of
	// the APIKey.
	ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	// Username is the username associated with the API key.
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// CreatedAt is a timestamp which the API key was created.
	CreatedAt int64 `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Hash is the hashed value of the API key.
	Hash                 []byte   `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

An APIKey is an api key specification.

func FixtureAPIKey

func FixtureAPIKey(name string, username string) *APIKey

FixtureAPIKey returns a testing fixture for an APIKey struct.

func NewAPIKeyFromFace

func NewAPIKeyFromFace(that APIKeyFace) *APIKey

func NewPopulatedAPIKey

func NewPopulatedAPIKey(r randyApikey, easy bool) *APIKey

func (*APIKey) Descriptor

func (*APIKey) Descriptor() ([]byte, []int)

func (*APIKey) Equal

func (this *APIKey) Equal(that interface{}) bool

func (*APIKey) Fields

func (a *APIKey) Fields() map[string]string

Fields returns a set of fields that represent the resource.

func (*APIKey) GetCreatedAt

func (this *APIKey) GetCreatedAt() int64

func (*APIKey) GetHash added in v2.18.0

func (this *APIKey) GetHash() []byte

func (*APIKey) GetMetadata

func (a *APIKey) GetMetadata() *ObjectMeta

func (*APIKey) GetObjectMeta

func (this *APIKey) GetObjectMeta() ObjectMeta

func (*APIKey) GetUsername

func (this *APIKey) GetUsername() string

func (*APIKey) Marshal

func (m *APIKey) Marshal() (dAtA []byte, err error)

func (*APIKey) MarshalTo

func (m *APIKey) MarshalTo(dAtA []byte) (int, error)

func (*APIKey) MarshalToSizedBuffer

func (m *APIKey) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*APIKey) Proto

func (*APIKey) ProtoMessage

func (*APIKey) ProtoMessage()

func (*APIKey) RBACName

func (*APIKey) RBACName() string

RBACName gets the rbac name of the resource.

func (*APIKey) Reset

func (m *APIKey) Reset()

func (*APIKey) SetMetadata

func (a *APIKey) SetMetadata(meta *ObjectMeta)

func (*APIKey) SetNamespace

func (a *APIKey) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*APIKey) SetObjectMeta

func (a *APIKey) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*APIKey) Size

func (m *APIKey) Size() (n int)

func (*APIKey) StoreName

func (a *APIKey) StoreName() string

func (*APIKey) StorePrefix

func (a *APIKey) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store.

func (*APIKey) String

func (m *APIKey) String() string

func (*APIKey) TestProto

func (*APIKey) URIPath

func (a *APIKey) URIPath() string

URIPath returns the path component of an api key URI.

func (*APIKey) Unmarshal

func (m *APIKey) Unmarshal(dAtA []byte) error

func (*APIKey) Validate

func (a *APIKey) Validate() error

Validate returns an error if the CheckName and Subscription fields are not provided.

func (*APIKey) XXX_DiscardUnknown

func (m *APIKey) XXX_DiscardUnknown()

func (*APIKey) XXX_Marshal

func (m *APIKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*APIKey) XXX_Merge

func (m *APIKey) XXX_Merge(src proto.Message)

func (*APIKey) XXX_Size

func (m *APIKey) XXX_Size() int

func (*APIKey) XXX_Unmarshal

func (m *APIKey) XXX_Unmarshal(b []byte) error

type APIKeyFace

type APIKeyFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetObjectMeta() ObjectMeta
	GetUsername() string
	GetCreatedAt() int64
	GetHash() []byte
}

type APIKeyResponse added in v2.18.0

type APIKeyResponse struct {
	Name string `json:"name"`
	Key  string `json:"key"`
}

APIKeyResponse is returned by the Sensu 7.x apikeys API

type AdhocRequest

type AdhocRequest struct {
	// Subscriptions is the list of entity subscriptions.
	Subscriptions []string `protobuf:"bytes,2,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"`
	// Creator is the author of the adhoc request.
	Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"`
	// Reason is used to provide context to the request.
	Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"`
	// Metadata contains the name, namespace, labels and annotations of the
	// AdhocCheck
	ObjectMeta           `protobuf:"bytes,5,opt,name=metadata,proto3,embedded=metadata" json:"metadata"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func FixtureAdhocRequest

func FixtureAdhocRequest(name string, subscriptions []string) *AdhocRequest

FixtureAdhocRequest returns a testing fixture for an AdhocRequest struct.

func NewPopulatedAdhocRequest

func NewPopulatedAdhocRequest(r randyAdhoc, easy bool) *AdhocRequest

func (*AdhocRequest) Descriptor

func (*AdhocRequest) Descriptor() ([]byte, []int)

func (*AdhocRequest) Equal

func (this *AdhocRequest) Equal(that interface{}) bool

func (*AdhocRequest) GetCreator

func (m *AdhocRequest) GetCreator() string

func (*AdhocRequest) GetMetadata

func (a *AdhocRequest) GetMetadata() *ObjectMeta

func (*AdhocRequest) GetObjectMeta added in v2.20.0

func (p *AdhocRequest) GetObjectMeta() ObjectMeta

GetObjectMeta returns the object metadata for the resource.

func (*AdhocRequest) GetReason

func (m *AdhocRequest) GetReason() string

func (*AdhocRequest) GetSubscriptions

func (m *AdhocRequest) GetSubscriptions() []string

func (*AdhocRequest) Marshal

func (m *AdhocRequest) Marshal() (dAtA []byte, err error)

func (*AdhocRequest) MarshalTo

func (m *AdhocRequest) MarshalTo(dAtA []byte) (int, error)

func (*AdhocRequest) MarshalToSizedBuffer

func (m *AdhocRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AdhocRequest) ProtoMessage

func (*AdhocRequest) ProtoMessage()

func (*AdhocRequest) RBACName

func (a *AdhocRequest) RBACName() string

func (*AdhocRequest) Reset

func (m *AdhocRequest) Reset()

func (*AdhocRequest) SetMetadata

func (a *AdhocRequest) SetMetadata(meta *ObjectMeta)

func (*AdhocRequest) SetNamespace

func (a *AdhocRequest) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*AdhocRequest) SetObjectMeta added in v2.20.0

func (p *AdhocRequest) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the object metadata for the resource.

func (*AdhocRequest) Size

func (m *AdhocRequest) Size() (n int)

func (*AdhocRequest) StoreName

func (a *AdhocRequest) StoreName() string

func (*AdhocRequest) StorePrefix

func (a *AdhocRequest) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*AdhocRequest) String

func (m *AdhocRequest) String() string

func (*AdhocRequest) URIPath

func (a *AdhocRequest) URIPath() string

URIPath is the URI path component to the adhoc request.

func (*AdhocRequest) Unmarshal

func (m *AdhocRequest) Unmarshal(dAtA []byte) error

func (*AdhocRequest) Validate

func (a *AdhocRequest) Validate() error

Validate returns an error if the name is not provided.

func (*AdhocRequest) XXX_DiscardUnknown

func (m *AdhocRequest) XXX_DiscardUnknown()

func (*AdhocRequest) XXX_Marshal

func (m *AdhocRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AdhocRequest) XXX_Merge

func (m *AdhocRequest) XXX_Merge(src proto.Message)

func (*AdhocRequest) XXX_Size

func (m *AdhocRequest) XXX_Size() int

func (*AdhocRequest) XXX_Unmarshal

func (m *AdhocRequest) XXX_Unmarshal(b []byte) error

type AgentHandshake

type AgentHandshake Entity

An AgentHandshake is the first message sent by a Backend on a Transport in a Session.

type Any

type Any struct {
	TypeUrl              string   `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
	Value                []byte   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewPopulatedAny

func NewPopulatedAny(r randyAny, easy bool) *Any

func (*Any) Descriptor

func (*Any) Descriptor() ([]byte, []int)

func (*Any) Equal

func (this *Any) Equal(that interface{}) bool

func (*Any) GetTypeUrl

func (m *Any) GetTypeUrl() string

func (*Any) GetValue

func (m *Any) GetValue() []byte

func (*Any) Marshal

func (m *Any) Marshal() (dAtA []byte, err error)

func (*Any) MarshalTo

func (m *Any) MarshalTo(dAtA []byte) (int, error)

func (*Any) MarshalToSizedBuffer

func (m *Any) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Any) ProtoMessage

func (*Any) ProtoMessage()

func (*Any) Reset

func (m *Any) Reset()

func (*Any) Size

func (m *Any) Size() (n int)

func (*Any) String

func (m *Any) String() string

func (*Any) Unmarshal

func (m *Any) Unmarshal(dAtA []byte) error

func (*Any) XXX_DiscardUnknown

func (m *Any) XXX_DiscardUnknown()

func (*Any) XXX_Marshal

func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Any) XXX_Merge

func (m *Any) XXX_Merge(src proto.Message)

func (*Any) XXX_Size

func (m *Any) XXX_Size() int

func (*Any) XXX_Unmarshal

func (m *Any) XXX_Unmarshal(b []byte) error

type Asset

type Asset struct {
	// URL is the location of the asset
	URL string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	// Sha512 is the SHA-512 checksum of the asset
	Sha512 string `protobuf:"bytes,3,opt,name=sha512,proto3" json:"sha512,omitempty"`
	// Filters are a collection of sensu queries, used by the system to
	// determine if the asset should be installed. If more than one filter is
	// present the queries are joined by the "AND" operator.
	Filters []string `protobuf:"bytes,5,rep,name=filters,proto3" json:"filters"`
	// AssetBuilds are a list of one or more assets to install.
	Builds []*AssetBuild `protobuf:"bytes,6,rep,name=builds,proto3" json:"builds"`
	// Metadata contains the name, namespace, labels and annotations of the
	// asset
	ObjectMeta `protobuf:"bytes,8,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	// Headers is a collection of key/value string pairs used as HTTP headers
	// for asset retrieval.
	Headers              map[string]string `` /* 145-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Asset defines an asset and optionally a list of assets (builds) that agents install as a dependency for a check, handler, mutator, etc.

func FixtureAsset

func FixtureAsset(name string) *Asset

FixtureAsset given a name returns a valid asset for use in tests

func NewAsset

func NewAsset(meta ObjectMeta) *Asset

NewAsset creates a new Asset.

func NewAssetFromFace

func NewAssetFromFace(that AssetFace) *Asset

func NewPopulatedAsset

func NewPopulatedAsset(r randyAsset, easy bool) *Asset

func (*Asset) Descriptor

func (*Asset) Descriptor() ([]byte, []int)

func (*Asset) Equal

func (this *Asset) Equal(that interface{}) bool

func (*Asset) Fields

func (a *Asset) Fields() map[string]string

Fields returns a set of fields that represent that resource

func (*Asset) Filename

func (a *Asset) Filename() string

Filename returns the filename of the underlying asset; pulled from the URL

func (*Asset) GetBuilds

func (this *Asset) GetBuilds() []*AssetBuild

func (*Asset) GetFilters

func (this *Asset) GetFilters() []string

func (*Asset) GetHeaders

func (this *Asset) GetHeaders() map[string]string

func (*Asset) GetMetadata

func (a *Asset) GetMetadata() *ObjectMeta

func (*Asset) GetObjectMeta

func (this *Asset) GetObjectMeta() ObjectMeta

func (*Asset) GetSha512

func (this *Asset) GetSha512() string

func (*Asset) GetURL

func (this *Asset) GetURL() string

func (*Asset) Marshal

func (m *Asset) Marshal() (dAtA []byte, err error)

func (*Asset) MarshalTo

func (m *Asset) MarshalTo(dAtA []byte) (int, error)

func (*Asset) MarshalToSizedBuffer

func (m *Asset) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Asset) Proto

func (*Asset) ProtoMessage

func (*Asset) ProtoMessage()

func (*Asset) RBACName

func (a *Asset) RBACName() string

func (*Asset) Reset

func (m *Asset) Reset()

func (*Asset) SetMetadata

func (a *Asset) SetMetadata(meta *ObjectMeta)

func (*Asset) SetNamespace

func (a *Asset) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*Asset) SetObjectMeta

func (a *Asset) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*Asset) Size

func (m *Asset) Size() (n int)

func (*Asset) StoreName

func (a *Asset) StoreName() string

func (*Asset) StorePrefix

func (a *Asset) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*Asset) String

func (m *Asset) String() string

func (*Asset) TestProto

func (*Asset) URIPath

func (a *Asset) URIPath() string

URIPath returns the path component of an asset URI.

func (*Asset) Unmarshal

func (m *Asset) Unmarshal(dAtA []byte) error

func (*Asset) Validate

func (a *Asset) Validate() error

Validate returns an error if the asset contains invalid values.

func (*Asset) XXX_DiscardUnknown

func (m *Asset) XXX_DiscardUnknown()

func (*Asset) XXX_Marshal

func (m *Asset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Asset) XXX_Merge

func (m *Asset) XXX_Merge(src proto.Message)

func (*Asset) XXX_Size

func (m *Asset) XXX_Size() int

func (*Asset) XXX_Unmarshal

func (m *Asset) XXX_Unmarshal(b []byte) error

type AssetBuild

type AssetBuild struct {
	// URL is the location of the asset
	URL string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	// Sha512 is the SHA-512 checksum of the asset
	Sha512 string `protobuf:"bytes,3,opt,name=sha512,proto3" json:"sha512,omitempty"`
	// Filters are a collection of sensu queries, used by the system to
	// determine if the asset should be installed. If more than one filter is
	// present the queries are joined by the "AND" operator.
	Filters []string `protobuf:"bytes,5,rep,name=filters,proto3" json:"filters"`
	// Headers is a collection of key/value string pairs used as HTTP headers
	// for asset retrieval.
	Headers              map[string]string `` /* 145-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

AssetBuild defines an individual asset that an asset can install as a dependency for a check, handler, mutator, etc.

func NewAssetBuildFromFace

func NewAssetBuildFromFace(that AssetBuildFace) *AssetBuild

func NewPopulatedAssetBuild

func NewPopulatedAssetBuild(r randyAsset, easy bool) *AssetBuild

func (*AssetBuild) Descriptor

func (*AssetBuild) Descriptor() ([]byte, []int)

func (*AssetBuild) Equal

func (this *AssetBuild) Equal(that interface{}) bool

func (*AssetBuild) GetFilters

func (this *AssetBuild) GetFilters() []string

func (*AssetBuild) GetHeaders

func (this *AssetBuild) GetHeaders() map[string]string

func (*AssetBuild) GetSha512

func (this *AssetBuild) GetSha512() string

func (*AssetBuild) GetURL

func (this *AssetBuild) GetURL() string

func (*AssetBuild) Marshal

func (m *AssetBuild) Marshal() (dAtA []byte, err error)

func (*AssetBuild) MarshalTo

func (m *AssetBuild) MarshalTo(dAtA []byte) (int, error)

func (*AssetBuild) MarshalToSizedBuffer

func (m *AssetBuild) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AssetBuild) Proto

func (*AssetBuild) ProtoMessage

func (*AssetBuild) ProtoMessage()

func (*AssetBuild) Reset

func (m *AssetBuild) Reset()

func (*AssetBuild) Size

func (m *AssetBuild) Size() (n int)

func (*AssetBuild) String

func (m *AssetBuild) String() string

func (*AssetBuild) TestProto

func (*AssetBuild) Unmarshal

func (m *AssetBuild) Unmarshal(dAtA []byte) error

func (*AssetBuild) Validate

func (a *AssetBuild) Validate() error

Validate returns an error if the asset contains invalid values.

func (*AssetBuild) XXX_DiscardUnknown

func (m *AssetBuild) XXX_DiscardUnknown()

func (*AssetBuild) XXX_Marshal

func (m *AssetBuild) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AssetBuild) XXX_Merge

func (m *AssetBuild) XXX_Merge(src proto.Message)

func (*AssetBuild) XXX_Size

func (m *AssetBuild) XXX_Size() int

func (*AssetBuild) XXX_Unmarshal

func (m *AssetBuild) XXX_Unmarshal(b []byte) error

type AssetBuildFace

type AssetBuildFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetURL() string
	GetSha512() string
	GetFilters() []string
	GetHeaders() map[string]string
}

type AssetFace

type AssetFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetURL() string
	GetSha512() string
	GetFilters() []string
	GetBuilds() []*AssetBuild
	GetObjectMeta() ObjectMeta
	GetHeaders() map[string]string
}

type AssetList

type AssetList struct {
	// Assets are a list of assets required to execute check or hook.
	Assets               []Asset  `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

An AssetList represents a list of assets for a CheckRequest.

func NewPopulatedAssetList

func NewPopulatedAssetList(r randyCheck, easy bool) *AssetList

func (*AssetList) Descriptor

func (*AssetList) Descriptor() ([]byte, []int)

func (*AssetList) Equal

func (this *AssetList) Equal(that interface{}) bool

func (*AssetList) GetAssets

func (m *AssetList) GetAssets() []Asset

func (*AssetList) Marshal

func (m *AssetList) Marshal() (dAtA []byte, err error)

func (*AssetList) MarshalTo

func (m *AssetList) MarshalTo(dAtA []byte) (int, error)

func (*AssetList) MarshalToSizedBuffer

func (m *AssetList) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AssetList) ProtoMessage

func (*AssetList) ProtoMessage()

func (*AssetList) Reset

func (m *AssetList) Reset()

func (*AssetList) Size

func (m *AssetList) Size() (n int)

func (*AssetList) String

func (m *AssetList) String() string

func (*AssetList) Unmarshal

func (m *AssetList) Unmarshal(dAtA []byte) error

func (*AssetList) XXX_DiscardUnknown

func (m *AssetList) XXX_DiscardUnknown()

func (*AssetList) XXX_Marshal

func (m *AssetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AssetList) XXX_Merge

func (m *AssetList) XXX_Merge(src proto.Message)

func (*AssetList) XXX_Size

func (m *AssetList) XXX_Size() int

func (*AssetList) XXX_Unmarshal

func (m *AssetList) XXX_Unmarshal(b []byte) error

type AuthProvider

type AuthProvider interface {
	Resource

	// Authenticate attempts to authenticate a user with its username and password
	Authenticate(ctx context.Context, username, password string) (*Claims, error)
	// Refresh renews the user claims with the provider claims
	Refresh(ctx context.Context, claims *Claims) (*Claims, error)

	// Name returns the provider name (e.g. default)
	Name() string
	// Type returns the provider type (e.g. ldap)
	Type() string
}

AuthProvider represents an abstracted authentication provider

type AuthProviderClaims

type AuthProviderClaims struct {
	// ProviderID used to login the user
	ProviderID string `json:"provider_id"`
	// ProviderType represents the type of provider used
	ProviderType string `json:"provider_type"`
	// UserID assigned to the user by the provider
	UserID string `json:"user_id"`
}

AuthProviderClaims contains information from the authentication provider

type BackendHandshake

type BackendHandshake struct{}

A BackendHandshake is the first message sent by a Backend on a Transport in a Session.

type ByExecuted

type ByExecuted []CheckHistory

DEPRECATED, DO NOT USE! Events should be ordered FIFO. ByExecuted implements the sort.Interface for []CheckHistory based on the Executed field.

Example:

sort.Sort(ByExecuted(check.History))

func (ByExecuted) Len

func (b ByExecuted) Len() int

func (ByExecuted) Less

func (b ByExecuted) Less(i, j int) bool

func (ByExecuted) Swap

func (b ByExecuted) Swap(i, j int)

type Check

type Check struct {
	// Command is the command to be executed.
	Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
	// Handlers are the event handler for the check (incidents and/or metrics).
	Handlers []string `protobuf:"bytes,3,rep,name=handlers,proto3" json:"handlers"`
	// HighFlapThreshold is the flap detection high threshold (% state change)
	// for the check. Sensu uses the same flap detection algorithm as Nagios.
	HighFlapThreshold uint32 `protobuf:"varint,4,opt,name=high_flap_threshold,json=highFlapThreshold,proto3" json:"high_flap_threshold"`
	// Interval is the interval, in seconds, at which the check should be run.
	Interval uint32 `protobuf:"varint,5,opt,name=interval,proto3" json:"interval"`
	// LowFlapThreshold is the flap detection low threshold (% state change) for
	// the check. Sensu uses the same flap detection algorithm as Nagios.
	LowFlapThreshold uint32 `protobuf:"varint,6,opt,name=low_flap_threshold,json=lowFlapThreshold,proto3" json:"low_flap_threshold"`
	// Publish indicates if check requests are published for the check
	Publish bool `protobuf:"varint,9,opt,name=publish,proto3" json:"publish"`
	// RuntimeAssets are a list of assets required to execute check.
	RuntimeAssets []string `protobuf:"bytes,10,rep,name=runtime_assets,json=runtimeAssets,proto3" json:"runtime_assets"`
	// Subscriptions is the list of subscribers for the check.
	Subscriptions []string `protobuf:"bytes,11,rep,name=subscriptions,proto3" json:"subscriptions"`
	// Sources indicates the name of the entity representing an external
	// resource
	ProxyEntityName string `protobuf:"bytes,13,opt,name=proxy_entity_name,json=proxyEntityName,proto3" json:"proxy_entity_name"`
	// CheckHooks is the list of check hooks for the check
	CheckHooks []HookList `protobuf:"bytes,14,rep,name=check_hooks,json=checkHooks,proto3" json:"check_hooks"`
	// STDIN indicates if the check command accepts JSON via stdin from the
	// agent
	Stdin bool `protobuf:"varint,15,opt,name=stdin,proto3" json:"stdin"`
	// Subdue represents one or more time windows when the check should be
	// subdued.
	Subdue *TimeWindowWhen `protobuf:"bytes,16,opt,name=subdue,proto3" json:"subdue"`
	// Cron is the cron string at which the check should be run.
	Cron string `protobuf:"bytes,17,opt,name=cron,proto3" json:"cron,omitempty"`
	// TTL represents the length of time in seconds for which a check result is
	// valid.
	Ttl int64 `protobuf:"varint,18,opt,name=ttl,proto3" json:"ttl"`
	// Timeout is the timeout, in seconds, at which the check has to run
	Timeout uint32 `protobuf:"varint,19,opt,name=timeout,proto3" json:"timeout"`
	// ProxyRequests represents a request to execute a proxy check
	ProxyRequests *ProxyRequests `protobuf:"bytes,20,opt,name=proxy_requests,json=proxyRequests,proto3" json:"proxy_requests,omitempty"`
	// RoundRobin enables round-robin scheduling if set true.
	RoundRobin bool `protobuf:"varint,21,opt,name=round_robin,json=roundRobin,proto3" json:"round_robin"`
	// Duration of execution
	Duration float64 `protobuf:"fixed64,22,opt,name=duration,proto3" json:"duration,omitempty"`
	// Executed describes the time in which the check request was executed
	Executed int64 `protobuf:"varint,23,opt,name=executed,proto3" json:"executed"`
	// History is the check state history.
	History []CheckHistory `protobuf:"bytes,24,rep,name=history,proto3" json:"history"`
	// Issued describes the time in which the check request was issued
	Issued int64 `protobuf:"varint,25,opt,name=issued,proto3" json:"issued"`
	// Output from the execution of Command
	Output string `protobuf:"bytes,26,opt,name=output,proto3" json:"output"`
	// State provides handlers with more information about the state change
	State string `protobuf:"bytes,27,opt,name=state,proto3" json:"state,omitempty"`
	// Status is the exit status code produced by the check
	Status uint32 `protobuf:"varint,28,opt,name=status,proto3" json:"status"`
	// TotalStateChange indicates the total state change percentage for the
	// check's history
	TotalStateChange uint32 `protobuf:"varint,29,opt,name=total_state_change,json=totalStateChange,proto3" json:"total_state_change"`
	// LastOK displays last time this check was ok; if event status is 0 this is
	// set to timestamp
	LastOK int64 `protobuf:"varint,30,opt,name=last_ok,json=lastOk,proto3" json:"last_ok"`
	// Occurrences indicates the number of times an event has occurred for a
	// client/check pair with the same check status
	Occurrences int64 `protobuf:"varint,31,opt,name=occurrences,proto3" json:"occurrences"`
	// OccurrencesWatermark indicates the high water mark tracking number of
	// occurrences at the current severity
	OccurrencesWatermark int64 `protobuf:"varint,32,opt,name=occurrences_watermark,json=occurrencesWatermark,proto3" json:"occurrences_watermark"`
	// Silenced is a list of silenced entry ids (subscription and check name)
	Silenced []string `protobuf:"bytes,33,rep,name=silenced,proto3" json:"silenced,omitempty"`
	// Hooks describes the results of multiple hooks; if event is associated to
	// hook execution.
	Hooks []*Hook `protobuf:"bytes,34,rep,name=hooks,proto3" json:"hooks,omitempty"`
	// OutputMetricFormat is the metric protocol that the check's output
	// will be expected to follow in order to be extracted.
	OutputMetricFormat string `protobuf:"bytes,35,opt,name=output_metric_format,json=outputMetricFormat,proto3" json:"output_metric_format"`
	// OutputMetricHandlers is the list of event handlers that will
	// respond to metrics that have been extracted from the check.
	OutputMetricHandlers []string `protobuf:"bytes,36,rep,name=output_metric_handlers,json=outputMetricHandlers,proto3" json:"output_metric_handlers"`
	// EnvVars is the list of environment variables to set for the check's
	// execution environment.
	EnvVars []string `protobuf:"bytes,37,rep,name=env_vars,json=envVars,proto3" json:"env_vars"`
	// Metadata contains the name, namespace, labels and annotations of the
	// check
	ObjectMeta `protobuf:"bytes,38,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	// MaxOutputSize is the maximum size in bytes that will be stored for check
	// output. If check output is larger than MaxOutputSize, it will be
	// truncated when stored. Filters, mutators, and handlers will still have
	// access to the full check output at the time the event occurs.
	MaxOutputSize int64 `protobuf:"varint,39,opt,name=max_output_size,json=maxOutputSize,proto3" json:"max_output_size,omitempty"`
	// DiscardOutput causes agents to discard check output. No check output is
	// written to the backend, but metrics extraction is still performed.
	DiscardOutput bool `protobuf:"varint,40,opt,name=discard_output,json=discardOutput,proto3" json:"discard_output,omitempty"`
	// Secrets is the list of Sensu secrets to set for the check's
	// execution environment.
	Secrets []*Secret `protobuf:"bytes,41,rep,name=secrets,proto3" json:"secrets"`
	// IsSilenced indicates whether the check is silenced or not
	IsSilenced bool `protobuf:"varint,42,opt,name=is_silenced,json=isSilenced,proto3" json:"is_silenced"`
	// OutputMetricTags is list of metric tags to apply to metrics extracted from check output.
	OutputMetricTags []*MetricTag `` /* 149-byte string literal not displayed */
	// Scheduler is the type of scheduler the check is scheduled by. The scheduler
	// can be "memory", "etcd", or "postgres". Scheduler is set by Sensu - any
	// setting by the user will be overridden.
	Scheduler string `protobuf:"bytes,44,opt,name=scheduler,proto3" json:"scheduler"`
	// ProcessedBy indicates the name of the agent that processed the event. This
	// is mainly useful for determining which agent executed a proxy check request.
	ProcessedBy string `protobuf:"bytes,45,opt,name=ProcessedBy,proto3" json:"processed_by,omitempty" yaml: "processed_by"`
	// Pipelines are the pipelines this check will use to process its events.
	Pipelines []*ResourceReference `protobuf:"bytes,46,rep,name=pipelines,proto3" json:"pipelines"`
	// MetricThresholds are a list of thresholds to apply to metrics in order to determine
	// the check status.
	OutputMetricThresholds []*MetricThreshold    `` /* 173-byte string literal not displayed */
	Subdues                []*TimeWindowRepeated `protobuf:"bytes,48,rep,name=subdues,proto3" json:"subdues,omitempty"`
	// ExtendedAttributes store serialized arbitrary JSON-encoded data
	ExtendedAttributes   []byte   `protobuf:"bytes,99,opt,name=ExtendedAttributes,proto3" json:"-"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A Check is a check specification and optionally the results of the check's execution.

func FixtureCheck

func FixtureCheck(id string) *Check

FixtureCheck returns a fixture for a Check object.

func NewCheck

func NewCheck(c *CheckConfig) *Check

NewCheck creates a new Check. It copies the fields from CheckConfig that match with Check's fields.

Because CheckConfig uses extended attributes, embedding CheckConfig was deemed to be too complicated, due to interactions between promoted methods and encoding/json.

func NewCheckFromFace

func NewCheckFromFace(that CheckFace) *Check

func NewPopulatedCheck

func NewPopulatedCheck(r randyCheck, easy bool) *Check

func (*Check) Descriptor

func (*Check) Descriptor() ([]byte, []int)

func (*Check) Equal

func (this *Check) Equal(that interface{}) bool

func (*Check) GetCheckHooks

func (this *Check) GetCheckHooks() []HookList

func (*Check) GetCommand

func (this *Check) GetCommand() string

func (*Check) GetCron

func (this *Check) GetCron() string

func (*Check) GetDiscardOutput

func (this *Check) GetDiscardOutput() bool

func (*Check) GetDuration

func (this *Check) GetDuration() float64

func (*Check) GetEnvVars

func (this *Check) GetEnvVars() []string

func (*Check) GetExecuted

func (this *Check) GetExecuted() int64

func (*Check) GetExtendedAttributes

func (this *Check) GetExtendedAttributes() []byte

func (*Check) GetHandlers

func (this *Check) GetHandlers() []string

func (*Check) GetHighFlapThreshold

func (this *Check) GetHighFlapThreshold() uint32

func (*Check) GetHistory

func (this *Check) GetHistory() []CheckHistory

func (*Check) GetHooks

func (this *Check) GetHooks() []*Hook

func (*Check) GetInterval

func (this *Check) GetInterval() uint32

func (*Check) GetIsSilenced

func (this *Check) GetIsSilenced() bool

func (*Check) GetIssued

func (this *Check) GetIssued() int64

func (*Check) GetLastOK

func (this *Check) GetLastOK() int64

func (*Check) GetLowFlapThreshold

func (this *Check) GetLowFlapThreshold() uint32

func (*Check) GetMaxOutputSize

func (this *Check) GetMaxOutputSize() int64

func (*Check) GetMetadata

func (c *Check) GetMetadata() *ObjectMeta

func (*Check) GetObjectMeta

func (this *Check) GetObjectMeta() ObjectMeta

func (*Check) GetOccurrences

func (this *Check) GetOccurrences() int64

func (*Check) GetOccurrencesWatermark

func (this *Check) GetOccurrencesWatermark() int64

func (*Check) GetOutput

func (this *Check) GetOutput() string

func (*Check) GetOutputMetricFormat

func (this *Check) GetOutputMetricFormat() string

func (*Check) GetOutputMetricHandlers

func (this *Check) GetOutputMetricHandlers() []string

func (*Check) GetOutputMetricTags

func (this *Check) GetOutputMetricTags() []*MetricTag

func (*Check) GetOutputMetricThresholds

func (this *Check) GetOutputMetricThresholds() []*MetricThreshold

func (*Check) GetPipelines

func (this *Check) GetPipelines() []*ResourceReference

func (*Check) GetProcessedBy

func (this *Check) GetProcessedBy() string

func (*Check) GetProxyEntityName

func (this *Check) GetProxyEntityName() string

func (*Check) GetProxyRequests

func (this *Check) GetProxyRequests() *ProxyRequests

func (*Check) GetPublish

func (this *Check) GetPublish() bool

func (*Check) GetRoundRobin

func (this *Check) GetRoundRobin() bool

func (*Check) GetRuntimeAssets

func (this *Check) GetRuntimeAssets() []string

func (*Check) GetScheduler

func (this *Check) GetScheduler() string

func (*Check) GetSecrets

func (this *Check) GetSecrets() []*Secret

func (*Check) GetSilenced

func (this *Check) GetSilenced() []string

func (*Check) GetState

func (this *Check) GetState() string

func (*Check) GetStatus

func (this *Check) GetStatus() uint32

func (*Check) GetStdin

func (this *Check) GetStdin() bool

func (*Check) GetSubdue

func (this *Check) GetSubdue() *TimeWindowWhen

func (*Check) GetSubdues

func (this *Check) GetSubdues() []*TimeWindowRepeated

func (*Check) GetSubscriptions

func (this *Check) GetSubscriptions() []string

func (*Check) GetTimeout

func (this *Check) GetTimeout() uint32

func (*Check) GetTotalStateChange

func (this *Check) GetTotalStateChange() uint32

func (*Check) GetTtl

func (this *Check) GetTtl() int64

func (*Check) Marshal

func (m *Check) Marshal() (dAtA []byte, err error)

func (*Check) MarshalJSON

func (c *Check) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Check) MarshalTo

func (m *Check) MarshalTo(dAtA []byte) (int, error)

func (*Check) MarshalToSizedBuffer

func (m *Check) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Check) MergeWith

func (c *Check) MergeWith(prevCheck *Check)

MergeWith updates the current Check with the history of the check given as an argument, updating the current check's history appropriately.

func (*Check) Proto

func (*Check) ProtoMessage

func (*Check) ProtoMessage()

func (*Check) RBACName

func (c *Check) RBACName() string

func (*Check) Reset

func (m *Check) Reset()

func (*Check) SetMetadata

func (c *Check) SetMetadata(meta *ObjectMeta)

func (*Check) SetName

func (c *Check) SetName(name string)

SetName sets the name of the resource.

func (*Check) SetNamespace

func (c *Check) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*Check) SetObjectMeta

func (c *Check) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*Check) Size

func (m *Check) Size() (n int)

func (*Check) StoreName

func (c *Check) StoreName() string

func (*Check) StorePrefix

func (c *Check) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*Check) String

func (m *Check) String() string

func (*Check) TestProto

func (*Check) URIPath

func (c *Check) URIPath() string

URIPath returns the path component of a check URI.

func (*Check) Unmarshal

func (m *Check) Unmarshal(dAtA []byte) error

func (*Check) Validate

func (c *Check) Validate() error

Validate returns an error if the check does not pass validation tests.

func (*Check) XXX_DiscardUnknown

func (m *Check) XXX_DiscardUnknown()

func (*Check) XXX_Marshal

func (m *Check) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Check) XXX_Merge

func (m *Check) XXX_Merge(src proto.Message)

func (*Check) XXX_Size

func (m *Check) XXX_Size() int

func (*Check) XXX_Unmarshal

func (m *Check) XXX_Unmarshal(b []byte) error

type CheckConfig

type CheckConfig struct {
	// Command is the command to be executed.
	Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
	// Handlers are the event handler for the check (incidents and/or metrics).
	Handlers []string `protobuf:"bytes,3,rep,name=handlers,proto3" json:"handlers"`
	// HighFlapThreshold is the flap detection high threshold (% state change)
	// for the check. Sensu uses the same flap detection algorithm as Nagios.
	HighFlapThreshold uint32 `protobuf:"varint,4,opt,name=high_flap_threshold,json=highFlapThreshold,proto3" json:"high_flap_threshold"`
	// Interval is the interval, in seconds, at which the check should be run.
	Interval uint32 `protobuf:"varint,5,opt,name=interval,proto3" json:"interval"`
	// LowFlapThreshold is the flap detection low threshold (% state change) for
	// the check. Sensu uses the same flap detection algorithm as Nagios.
	LowFlapThreshold uint32 `protobuf:"varint,6,opt,name=low_flap_threshold,json=lowFlapThreshold,proto3" json:"low_flap_threshold"`
	// Publish indicates if check requests are published for the check
	Publish bool `protobuf:"varint,9,opt,name=publish,proto3" json:"publish"`
	// RuntimeAssets are a list of assets required to execute check.
	RuntimeAssets []string `protobuf:"bytes,10,rep,name=runtime_assets,json=runtimeAssets,proto3" json:"runtime_assets"`
	// Subscriptions is the list of subscribers for the check.
	Subscriptions []string `protobuf:"bytes,11,rep,name=subscriptions,proto3" json:"subscriptions"`
	// ExtendedAttributes store serialized arbitrary JSON-encoded data
	ExtendedAttributes []byte `protobuf:"bytes,12,opt,name=ExtendedAttributes,proto3" json:"-"`
	// Sources indicates the name of the entity representing an external
	// resource
	ProxyEntityName string `protobuf:"bytes,13,opt,name=proxy_entity_name,json=proxyEntityName,proto3" json:"proxy_entity_name"`
	// CheckHooks is the list of check hooks for the check
	CheckHooks []HookList `protobuf:"bytes,14,rep,name=check_hooks,json=checkHooks,proto3" json:"check_hooks"`
	// STDIN indicates if the check command accepts JSON via stdin from the
	// agent
	Stdin bool `protobuf:"varint,15,opt,name=stdin,proto3" json:"stdin"`
	// Subdue represents one or more time windows when the check should be
	// subdued.
	Subdue *TimeWindowWhen `protobuf:"bytes,16,opt,name=subdue,proto3" json:"subdue"`
	// Cron is the cron string at which the check should be run.
	Cron string `protobuf:"bytes,17,opt,name=cron,proto3" json:"cron,omitempty"`
	// TTL represents the length of time in seconds for which a check result is
	// valid.
	Ttl int64 `protobuf:"varint,18,opt,name=ttl,proto3" json:"ttl"`
	// Timeout is the timeout, in seconds, at which the check has to run
	Timeout uint32 `protobuf:"varint,19,opt,name=timeout,proto3" json:"timeout"`
	// ProxyRequests represents a request to execute a proxy check
	ProxyRequests *ProxyRequests `protobuf:"bytes,20,opt,name=proxy_requests,json=proxyRequests,proto3" json:"proxy_requests,omitempty"`
	// RoundRobin enables round-robin scheduling if set true.
	RoundRobin bool `protobuf:"varint,21,opt,name=round_robin,json=roundRobin,proto3" json:"round_robin"`
	// OutputOutputMetricFormat is the metric protocol that the check's output
	// will be expected to follow in order to be extracted.
	OutputMetricFormat string `protobuf:"bytes,22,opt,name=output_metric_format,json=outputMetricFormat,proto3" json:"output_metric_format"`
	// OutputOutputMetricHandlers is the list of event handlers that will
	// respond to metrics that have been extracted from the check.
	OutputMetricHandlers []string `protobuf:"bytes,23,rep,name=output_metric_handlers,json=outputMetricHandlers,proto3" json:"output_metric_handlers"`
	// EnvVars is the list of environment variables to set for the check's
	// execution environment.
	EnvVars []string `protobuf:"bytes,24,rep,name=env_vars,json=envVars,proto3" json:"env_vars"`
	// Metadata contains the name, namespace, labels and annotations of the
	// check
	ObjectMeta `protobuf:"bytes,26,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	// MaxOutputSize is the maximum size in bytes that will be stored for check
	// output. If check output is larger than MaxOutputSize, it will be
	// truncated when stored. Filters, mutators, and handlers will still have
	// access to the full check output at the time the event occurs.
	MaxOutputSize int64 `protobuf:"varint,27,opt,name=max_output_size,json=maxOutputSize,proto3" json:"max_output_size,omitempty"`
	// DiscardOutput causes agents to discard check output. No check output is
	// written to the backend, but metrics extraction is still performed.
	DiscardOutput bool `protobuf:"varint,28,opt,name=discard_output,json=discardOutput,proto3" json:"discard_output,omitempty"`
	// Secrets is the list of Sensu secrets to set for the check's
	// execution environment.
	Secrets []*Secret `protobuf:"bytes,29,rep,name=secrets,proto3" json:"secrets"`
	// OutputMetricTags is list of metric tags to apply to metrics extracted from check output.
	OutputMetricTags []*MetricTag `` /* 149-byte string literal not displayed */
	// Scheduler is the type of scheduler the check is scheduled by. The scheduler
	// can be "memory", "etcd", or "postgres". Scheduler is set by Sensu - any
	// setting by the user will be overridden.
	Scheduler string `protobuf:"bytes,31,opt,name=scheduler,proto3" json:"-" yaml: "-"`
	// Pipelines are the pipelines this check will use to process its events.
	Pipelines              []*ResourceReference  `protobuf:"bytes,32,rep,name=pipelines,proto3" json:"pipelines"`
	OutputMetricThresholds []*MetricThreshold    `` /* 173-byte string literal not displayed */
	Subdues                []*TimeWindowRepeated `protobuf:"bytes,34,rep,name=subdues,proto3" json:"subdues,omitempty"`
	XXX_NoUnkeyedLiteral   struct{}              `json:"-"`
	XXX_unrecognized       []byte                `json:"-"`
	XXX_sizecache          int32                 `json:"-"`
}

CheckConfig is the specification of a check.

func FixtureCheckConfig

func FixtureCheckConfig(id string) *CheckConfig

FixtureCheckConfig returns a fixture for a CheckConfig object.

func NewCheckConfig

func NewCheckConfig(meta ObjectMeta) *CheckConfig

NewCheckConfig creates a new CheckConfig.

func NewCheckConfigFromFace

func NewCheckConfigFromFace(that CheckConfigFace) *CheckConfig

func NewPopulatedCheckConfig

func NewPopulatedCheckConfig(r randyCheck, easy bool) *CheckConfig

func (*CheckConfig) Descriptor

func (*CheckConfig) Descriptor() ([]byte, []int)

func (*CheckConfig) Equal

func (this *CheckConfig) Equal(that interface{}) bool

func (*CheckConfig) Fields

func (c *CheckConfig) Fields() map[string]string

CheckConfigFields returns a set of fields that represent that resource

func (*CheckConfig) GetCheckHooks

func (this *CheckConfig) GetCheckHooks() []HookList

func (*CheckConfig) GetCommand

func (this *CheckConfig) GetCommand() string

func (*CheckConfig) GetCron

func (this *CheckConfig) GetCron() string

func (*CheckConfig) GetDiscardOutput

func (this *CheckConfig) GetDiscardOutput() bool

func (*CheckConfig) GetEnvVars

func (this *CheckConfig) GetEnvVars() []string

func (*CheckConfig) GetExtendedAttributes

func (this *CheckConfig) GetExtendedAttributes() []byte

func (*CheckConfig) GetHandlers

func (this *CheckConfig) GetHandlers() []string

func (*CheckConfig) GetHighFlapThreshold

func (this *CheckConfig) GetHighFlapThreshold() uint32

func (*CheckConfig) GetInterval

func (this *CheckConfig) GetInterval() uint32

func (*CheckConfig) GetLowFlapThreshold

func (this *CheckConfig) GetLowFlapThreshold() uint32

func (*CheckConfig) GetMaxOutputSize

func (this *CheckConfig) GetMaxOutputSize() int64

func (*CheckConfig) GetMetadata

func (c *CheckConfig) GetMetadata() *ObjectMeta

func (*CheckConfig) GetObjectMeta

func (this *CheckConfig) GetObjectMeta() ObjectMeta

func (*CheckConfig) GetOutputMetricFormat

func (this *CheckConfig) GetOutputMetricFormat() string

func (*CheckConfig) GetOutputMetricHandlers

func (this *CheckConfig) GetOutputMetricHandlers() []string

func (*CheckConfig) GetOutputMetricTags

func (this *CheckConfig) GetOutputMetricTags() []*MetricTag

func (*CheckConfig) GetOutputMetricThresholds

func (this *CheckConfig) GetOutputMetricThresholds() []*MetricThreshold

func (*CheckConfig) GetPipelines

func (this *CheckConfig) GetPipelines() []*ResourceReference

func (*CheckConfig) GetProxyEntityName

func (this *CheckConfig) GetProxyEntityName() string

func (*CheckConfig) GetProxyRequests

func (this *CheckConfig) GetProxyRequests() *ProxyRequests

func (*CheckConfig) GetPublish

func (this *CheckConfig) GetPublish() bool

func (*CheckConfig) GetRoundRobin

func (this *CheckConfig) GetRoundRobin() bool

func (*CheckConfig) GetRuntimeAssets

func (this *CheckConfig) GetRuntimeAssets() []string

func (*CheckConfig) GetScheduler

func (this *CheckConfig) GetScheduler() string

func (*CheckConfig) GetSecrets

func (this *CheckConfig) GetSecrets() []*Secret

func (*CheckConfig) GetStdin

func (this *CheckConfig) GetStdin() bool

func (*CheckConfig) GetSubdue

func (this *CheckConfig) GetSubdue() *TimeWindowWhen

func (*CheckConfig) GetSubdues

func (this *CheckConfig) GetSubdues() []*TimeWindowRepeated

func (*CheckConfig) GetSubscriptions

func (this *CheckConfig) GetSubscriptions() []string

func (*CheckConfig) GetTimeout

func (this *CheckConfig) GetTimeout() uint32

func (*CheckConfig) GetTtl

func (this *CheckConfig) GetTtl() int64

func (*CheckConfig) IsSubdued

func (c *CheckConfig) IsSubdued() bool

IsSubdued returns true if the check is subdued at the current time. It returns false otherwise.

func (*CheckConfig) Marshal

func (m *CheckConfig) Marshal() (dAtA []byte, err error)

func (*CheckConfig) MarshalJSON

func (c *CheckConfig) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*CheckConfig) MarshalTo

func (m *CheckConfig) MarshalTo(dAtA []byte) (int, error)

func (*CheckConfig) MarshalToSizedBuffer

func (m *CheckConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CheckConfig) Proto

func (*CheckConfig) ProtoMessage

func (*CheckConfig) ProtoMessage()

func (*CheckConfig) RBACName

func (c *CheckConfig) RBACName() string

func (*CheckConfig) Reset

func (m *CheckConfig) Reset()

func (*CheckConfig) SetMetadata

func (c *CheckConfig) SetMetadata(meta *ObjectMeta)

func (*CheckConfig) SetNamespace

func (c *CheckConfig) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*CheckConfig) SetObjectMeta

func (c *CheckConfig) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*CheckConfig) Size

func (m *CheckConfig) Size() (n int)

func (*CheckConfig) StoreName

func (c *CheckConfig) StoreName() string

func (*CheckConfig) StorePrefix

func (c *CheckConfig) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*CheckConfig) String

func (m *CheckConfig) String() string

func (*CheckConfig) TestProto

func (*CheckConfig) URIPath

func (c *CheckConfig) URIPath() string

URIPath returns the path component of a CheckConfig URI.

func (*CheckConfig) Unmarshal

func (m *CheckConfig) Unmarshal(dAtA []byte) error

func (*CheckConfig) Validate

func (c *CheckConfig) Validate() error

Validate returns an error if the check does not pass validation tests.

func (*CheckConfig) XXX_DiscardUnknown

func (m *CheckConfig) XXX_DiscardUnknown()

func (*CheckConfig) XXX_Marshal

func (m *CheckConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckConfig) XXX_Merge

func (m *CheckConfig) XXX_Merge(src proto.Message)

func (*CheckConfig) XXX_Size

func (m *CheckConfig) XXX_Size() int

func (*CheckConfig) XXX_Unmarshal

func (m *CheckConfig) XXX_Unmarshal(b []byte) error

type CheckConfigFace

type CheckConfigFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetCommand() string
	GetHandlers() []string
	GetHighFlapThreshold() uint32
	GetInterval() uint32
	GetLowFlapThreshold() uint32
	GetPublish() bool
	GetRuntimeAssets() []string
	GetSubscriptions() []string
	GetExtendedAttributes() []byte
	GetProxyEntityName() string
	GetCheckHooks() []HookList
	GetStdin() bool
	GetSubdue() *TimeWindowWhen
	GetCron() string
	GetTtl() int64
	GetTimeout() uint32
	GetProxyRequests() *ProxyRequests
	GetRoundRobin() bool
	GetOutputMetricFormat() string
	GetOutputMetricHandlers() []string
	GetEnvVars() []string
	GetObjectMeta() ObjectMeta
	GetMaxOutputSize() int64
	GetDiscardOutput() bool
	GetSecrets() []*Secret
	GetOutputMetricTags() []*MetricTag
	GetScheduler() string
	GetPipelines() []*ResourceReference
	GetOutputMetricThresholds() []*MetricThreshold
	GetSubdues() []*TimeWindowRepeated
}

type CheckFace

type CheckFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetCommand() string
	GetHandlers() []string
	GetHighFlapThreshold() uint32
	GetInterval() uint32
	GetLowFlapThreshold() uint32
	GetPublish() bool
	GetRuntimeAssets() []string
	GetSubscriptions() []string
	GetProxyEntityName() string
	GetCheckHooks() []HookList
	GetStdin() bool
	GetSubdue() *TimeWindowWhen
	GetCron() string
	GetTtl() int64
	GetTimeout() uint32
	GetProxyRequests() *ProxyRequests
	GetRoundRobin() bool
	GetDuration() float64
	GetExecuted() int64
	GetHistory() []CheckHistory
	GetIssued() int64
	GetOutput() string
	GetState() string
	GetStatus() uint32
	GetTotalStateChange() uint32
	GetLastOK() int64
	GetOccurrences() int64
	GetOccurrencesWatermark() int64
	GetSilenced() []string
	GetHooks() []*Hook
	GetOutputMetricFormat() string
	GetOutputMetricHandlers() []string
	GetEnvVars() []string
	GetObjectMeta() ObjectMeta
	GetMaxOutputSize() int64
	GetDiscardOutput() bool
	GetSecrets() []*Secret
	GetIsSilenced() bool
	GetOutputMetricTags() []*MetricTag
	GetScheduler() string
	GetProcessedBy() string
	GetPipelines() []*ResourceReference
	GetOutputMetricThresholds() []*MetricThreshold
	GetSubdues() []*TimeWindowRepeated
	GetExtendedAttributes() []byte
}

type CheckHistory

type CheckHistory struct {
	// Status is the exit status code produced by the check.
	Status uint32 `protobuf:"varint,1,opt,name=status,proto3" json:"status"`
	// Executed describes the time in which the check request was executed
	Executed int64 `protobuf:"varint,2,opt,name=executed,proto3" json:"executed"`
	// Flapping describes whether the check was flapping at this particular
	// point in time. Comparing this value to the current flapping status allows
	// filters to trigger only on start and end of flapping. NB! This has been
	// disabled for 5.x releases.
	Flapping             bool     `protobuf:"varint,3,opt,name=flapping,proto3" json:"-"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

CheckHistory is a record of a check execution and its status

func NewPopulatedCheckHistory

func NewPopulatedCheckHistory(r randyCheck, easy bool) *CheckHistory

func (*CheckHistory) Descriptor

func (*CheckHistory) Descriptor() ([]byte, []int)

func (*CheckHistory) Equal

func (this *CheckHistory) Equal(that interface{}) bool

func (*CheckHistory) GetExecuted

func (m *CheckHistory) GetExecuted() int64

func (*CheckHistory) GetFlapping

func (m *CheckHistory) GetFlapping() bool

func (*CheckHistory) GetStatus

func (m *CheckHistory) GetStatus() uint32

func (*CheckHistory) Marshal

func (m *CheckHistory) Marshal() (dAtA []byte, err error)

func (*CheckHistory) MarshalTo

func (m *CheckHistory) MarshalTo(dAtA []byte) (int, error)

func (*CheckHistory) MarshalToSizedBuffer

func (m *CheckHistory) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CheckHistory) ProtoMessage

func (*CheckHistory) ProtoMessage()

func (*CheckHistory) Reset

func (m *CheckHistory) Reset()

func (*CheckHistory) Size

func (m *CheckHistory) Size() (n int)

func (*CheckHistory) String

func (m *CheckHistory) String() string

func (*CheckHistory) Unmarshal

func (m *CheckHistory) Unmarshal(dAtA []byte) error

func (*CheckHistory) XXX_DiscardUnknown

func (m *CheckHistory) XXX_DiscardUnknown()

func (*CheckHistory) XXX_Marshal

func (m *CheckHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckHistory) XXX_Merge

func (m *CheckHistory) XXX_Merge(src proto.Message)

func (*CheckHistory) XXX_Size

func (m *CheckHistory) XXX_Size() int

func (*CheckHistory) XXX_Unmarshal

func (m *CheckHistory) XXX_Unmarshal(b []byte) error

type CheckRequest

type CheckRequest struct {
	// Config is the specification of a check.
	Config *CheckConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// Assets are a list of assets required to execute check.
	Assets []Asset `protobuf:"bytes,2,rep,name=assets,proto3" json:"assets"`
	// Hooks are a list of hooks to be executed after a check.
	Hooks []HookConfig `protobuf:"bytes,3,rep,name=hooks,proto3" json:"hooks"`
	// Issued describes the time in which the check request was issued
	Issued int64 `protobuf:"varint,4,opt,name=Issued,proto3" json:"issued"`
	// HookAssets is a map of assets required to execute hooks.
	HookAssets map[string]*AssetList `` /* 169-byte string literal not displayed */
	// Secrets is a list of kv to be added to the env vars of a check.
	Secrets              []string `protobuf:"bytes,6,rep,name=secrets,proto3" json:"secrets,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A CheckRequest represents a request to execute a check

func FixtureCheckRequest

func FixtureCheckRequest(id string) *CheckRequest

FixtureCheckRequest returns a fixture for a CheckRequest object.

func NewPopulatedCheckRequest

func NewPopulatedCheckRequest(r randyCheck, easy bool) *CheckRequest

func (*CheckRequest) Descriptor

func (*CheckRequest) Descriptor() ([]byte, []int)

func (*CheckRequest) Equal

func (this *CheckRequest) Equal(that interface{}) bool

func (*CheckRequest) GetAssets

func (m *CheckRequest) GetAssets() []Asset

func (*CheckRequest) GetConfig

func (m *CheckRequest) GetConfig() *CheckConfig

func (*CheckRequest) GetHookAssets

func (m *CheckRequest) GetHookAssets() map[string]*AssetList

func (*CheckRequest) GetHooks

func (m *CheckRequest) GetHooks() []HookConfig

func (*CheckRequest) GetIssued

func (m *CheckRequest) GetIssued() int64

func (*CheckRequest) GetSecrets

func (m *CheckRequest) GetSecrets() []string

func (*CheckRequest) Marshal

func (m *CheckRequest) Marshal() (dAtA []byte, err error)

func (*CheckRequest) MarshalTo

func (m *CheckRequest) MarshalTo(dAtA []byte) (int, error)

func (*CheckRequest) MarshalToSizedBuffer

func (m *CheckRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CheckRequest) ProtoMessage

func (*CheckRequest) ProtoMessage()

func (*CheckRequest) Reset

func (m *CheckRequest) Reset()

func (*CheckRequest) Size

func (m *CheckRequest) Size() (n int)

func (*CheckRequest) String

func (m *CheckRequest) String() string

func (*CheckRequest) Unmarshal

func (m *CheckRequest) Unmarshal(dAtA []byte) error

func (*CheckRequest) Validate

func (r *CheckRequest) Validate() bool

func (*CheckRequest) XXX_DiscardUnknown

func (m *CheckRequest) XXX_DiscardUnknown()

func (*CheckRequest) XXX_Marshal

func (m *CheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckRequest) XXX_Merge

func (m *CheckRequest) XXX_Merge(src proto.Message)

func (*CheckRequest) XXX_Size

func (m *CheckRequest) XXX_Size() int

func (*CheckRequest) XXX_Unmarshal

func (m *CheckRequest) XXX_Unmarshal(b []byte) error

type Claims

type Claims struct {
	jwt.StandardClaims

	// Custom claims
	Groups    []string           `json:"groups"`
	Provider  AuthProviderClaims `json:"provider"`
	APIKey    bool               `json:"api_key"`
	SessionID string             `json:"session_id"`
}

Claims represents the JWT claims

func FixtureClaims

func FixtureClaims(username string, groups []string) *Claims

FixtureClaims returns a testing fixture for a JWT claims

type ClusterHealth

type ClusterHealth struct {
	// MemberID is the etcd cluster member's ID.
	MemberID uint64

	// MemberIDHex is the hexadecimal representation of the member's ID.
	MemberIDHex string

	// Name is the cluster member's name.
	Name string

	// Err contains any error encountered while checking the member's health.
	Err string

	// Healthy describes the health of the cluster member.
	Healthy bool
}

ClusterHealth holds cluster member status info.

func (ClusterHealth) MarshalJSON

func (h ClusterHealth) MarshalJSON() ([]byte, error)

type ClusterRole

type ClusterRole struct {
	Rules []Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules"`
	// Metadata contains name, namespace, labels and annotations
	ObjectMeta           `protobuf:"bytes,3,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ClusterRole applies to all namespaces within a cluster.

func FixtureClusterRole

func FixtureClusterRole(name string) *ClusterRole

FixtureClusterRole returns a partial role

func NewClusterRoleFromFace

func NewClusterRoleFromFace(that ClusterRoleFace) *ClusterRole

func NewPopulatedClusterRole

func NewPopulatedClusterRole(r randyRbac, easy bool) *ClusterRole

func (*ClusterRole) Descriptor

func (*ClusterRole) Descriptor() ([]byte, []int)

func (*ClusterRole) Equal

func (this *ClusterRole) Equal(that interface{}) bool

func (*ClusterRole) Fields

func (c *ClusterRole) Fields() map[string]string

Fields returns a set of fields that represent that resource

func (*ClusterRole) GetMetadata

func (c *ClusterRole) GetMetadata() *ObjectMeta

func (*ClusterRole) GetObjectMeta

func (this *ClusterRole) GetObjectMeta() ObjectMeta

func (*ClusterRole) GetRules

func (this *ClusterRole) GetRules() []Rule

func (*ClusterRole) IsGlobalResource

func (c *ClusterRole) IsGlobalResource() bool

func (*ClusterRole) Marshal

func (m *ClusterRole) Marshal() (dAtA []byte, err error)

func (*ClusterRole) MarshalTo

func (m *ClusterRole) MarshalTo(dAtA []byte) (int, error)

func (*ClusterRole) MarshalToSizedBuffer

func (m *ClusterRole) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClusterRole) Proto

func (*ClusterRole) ProtoMessage

func (*ClusterRole) ProtoMessage()

func (*ClusterRole) RBACName

func (*ClusterRole) RBACName() string

RBACName returns the name of the resource for RBAC

func (*ClusterRole) Reset

func (m *ClusterRole) Reset()

func (*ClusterRole) SetMetadata

func (c *ClusterRole) SetMetadata(meta *ObjectMeta)

func (*ClusterRole) SetNamespace

func (r *ClusterRole) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*ClusterRole) SetObjectMeta

func (r *ClusterRole) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*ClusterRole) Size

func (m *ClusterRole) Size() (n int)

func (*ClusterRole) StoreName

func (c *ClusterRole) StoreName() string

func (*ClusterRole) StorePrefix

func (r *ClusterRole) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*ClusterRole) String

func (m *ClusterRole) String() string

func (*ClusterRole) TestProto

func (*ClusterRole) URIPath

func (r *ClusterRole) URIPath() string

URIPath returns the path component of a cluster role URI.

func (*ClusterRole) Unmarshal

func (m *ClusterRole) Unmarshal(dAtA []byte) error

func (*ClusterRole) Validate

func (r *ClusterRole) Validate() error

Validate a ClusterRole

func (*ClusterRole) XXX_DiscardUnknown

func (m *ClusterRole) XXX_DiscardUnknown()

func (*ClusterRole) XXX_Marshal

func (m *ClusterRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClusterRole) XXX_Merge

func (m *ClusterRole) XXX_Merge(src proto.Message)

func (*ClusterRole) XXX_Size

func (m *ClusterRole) XXX_Size() int

func (*ClusterRole) XXX_Unmarshal

func (m *ClusterRole) XXX_Unmarshal(b []byte) error

type ClusterRoleBinding

type ClusterRoleBinding struct {
	// Subjects holds references to the objects the ClusterRole applies to
	Subjects []Subject `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects"`
	// RoleRef references a ClusterRole in the current namespace
	RoleRef RoleRef `protobuf:"bytes,2,opt,name=role_ref,json=roleRef,proto3" json:"role_ref"`
	// Metadata contains name, namespace, labels and annotations
	ObjectMeta           `protobuf:"bytes,4,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ClusterRoleBinding grants the permissions defined in a ClusterRole referenced to a user or a set of users

func FixtureClusterRoleBinding

func FixtureClusterRoleBinding(name string) *ClusterRoleBinding

FixtureClusterRoleBinding creates a ClusterRoleBinding for testing

func NewClusterRoleBindingFromFace

func NewClusterRoleBindingFromFace(that ClusterRoleBindingFace) *ClusterRoleBinding

func NewPopulatedClusterRoleBinding

func NewPopulatedClusterRoleBinding(r randyRbac, easy bool) *ClusterRoleBinding

func (*ClusterRoleBinding) Descriptor

func (*ClusterRoleBinding) Descriptor() ([]byte, []int)

func (*ClusterRoleBinding) Equal

func (this *ClusterRoleBinding) Equal(that interface{}) bool

func (*ClusterRoleBinding) Fields

func (c *ClusterRoleBinding) Fields() map[string]string

Fields returns a set of fields that represent that resource

func (*ClusterRoleBinding) GetMetadata

func (c *ClusterRoleBinding) GetMetadata() *ObjectMeta

func (*ClusterRoleBinding) GetObjectMeta

func (this *ClusterRoleBinding) GetObjectMeta() ObjectMeta

func (*ClusterRoleBinding) GetRoleRef

func (this *ClusterRoleBinding) GetRoleRef() RoleRef

func (*ClusterRoleBinding) GetSubjects

func (this *ClusterRoleBinding) GetSubjects() []Subject

func (*ClusterRoleBinding) IsGlobalResource

func (c *ClusterRoleBinding) IsGlobalResource() bool

func (*ClusterRoleBinding) Marshal

func (m *ClusterRoleBinding) Marshal() (dAtA []byte, err error)

func (*ClusterRoleBinding) MarshalTo

func (m *ClusterRoleBinding) MarshalTo(dAtA []byte) (int, error)

func (*ClusterRoleBinding) MarshalToSizedBuffer

func (m *ClusterRoleBinding) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClusterRoleBinding) Proto

func (*ClusterRoleBinding) ProtoMessage

func (*ClusterRoleBinding) ProtoMessage()

func (*ClusterRoleBinding) RBACName

func (*ClusterRoleBinding) RBACName() string

RBACName returns the name of the resource for RBAC

func (*ClusterRoleBinding) Reset

func (m *ClusterRoleBinding) Reset()

func (*ClusterRoleBinding) SetMetadata

func (c *ClusterRoleBinding) SetMetadata(meta *ObjectMeta)

func (*ClusterRoleBinding) SetNamespace

func (b *ClusterRoleBinding) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*ClusterRoleBinding) SetObjectMeta

func (b *ClusterRoleBinding) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*ClusterRoleBinding) Size

func (m *ClusterRoleBinding) Size() (n int)

func (*ClusterRoleBinding) StoreName

func (c *ClusterRoleBinding) StoreName() string

func (*ClusterRoleBinding) StorePrefix

func (b *ClusterRoleBinding) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*ClusterRoleBinding) String

func (m *ClusterRoleBinding) String() string

func (*ClusterRoleBinding) TestProto

func (*ClusterRoleBinding) URIPath

func (b *ClusterRoleBinding) URIPath() string

URIPath returns the path component of a cluster role binding URI.

func (*ClusterRoleBinding) Unmarshal

func (m *ClusterRoleBinding) Unmarshal(dAtA []byte) error

func (*ClusterRoleBinding) Validate

func (b *ClusterRoleBinding) Validate() error

Validate a ClusterRoleBinding

func (*ClusterRoleBinding) XXX_DiscardUnknown

func (m *ClusterRoleBinding) XXX_DiscardUnknown()

func (*ClusterRoleBinding) XXX_Marshal

func (m *ClusterRoleBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClusterRoleBinding) XXX_Merge

func (m *ClusterRoleBinding) XXX_Merge(src proto.Message)

func (*ClusterRoleBinding) XXX_Size

func (m *ClusterRoleBinding) XXX_Size() int

func (*ClusterRoleBinding) XXX_Unmarshal

func (m *ClusterRoleBinding) XXX_Unmarshal(b []byte) error

type ClusterRoleBindingFace

type ClusterRoleBindingFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetSubjects() []Subject
	GetRoleRef() RoleRef
	GetObjectMeta() ObjectMeta
}

type ClusterRoleFace

type ClusterRoleFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetRules() []Rule
	GetObjectMeta() ObjectMeta
}

type Comparison

type Comparison int
const (
	MetaLess    Comparison = -1
	MetaEqual   Comparison = 0
	MetaGreater Comparison = 1
)

type ConstrainedResource

type ConstrainedResource interface {
	Validate() error
}

ConstrainedResource defines a resources that has contraints on it's attributes

type Deregistration

type Deregistration struct {
	Handler              string   `protobuf:"bytes,1,opt,name=handler,proto3" json:"handler,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Deregistration contains configuration for Sensu entity de-registration.

func NewPopulatedDeregistration

func NewPopulatedDeregistration(r randyEntity, easy bool) *Deregistration

func (*Deregistration) Descriptor

func (*Deregistration) Descriptor() ([]byte, []int)

func (*Deregistration) Equal

func (this *Deregistration) Equal(that interface{}) bool

func (*Deregistration) GetHandler

func (m *Deregistration) GetHandler() string

func (*Deregistration) Marshal

func (m *Deregistration) Marshal() (dAtA []byte, err error)

func (*Deregistration) MarshalTo

func (m *Deregistration) MarshalTo(dAtA []byte) (int, error)

func (*Deregistration) MarshalToSizedBuffer

func (m *Deregistration) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Deregistration) ProtoMessage

func (*Deregistration) ProtoMessage()

func (*Deregistration) Reset

func (m *Deregistration) Reset()

func (*Deregistration) Size

func (m *Deregistration) Size() (n int)

func (*Deregistration) String

func (m *Deregistration) String() string

func (*Deregistration) Unmarshal

func (m *Deregistration) Unmarshal(dAtA []byte) error

func (*Deregistration) XXX_DiscardUnknown

func (m *Deregistration) XXX_DiscardUnknown()

func (*Deregistration) XXX_Marshal

func (m *Deregistration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Deregistration) XXX_Merge

func (m *Deregistration) XXX_Merge(src proto.Message)

func (*Deregistration) XXX_Size

func (m *Deregistration) XXX_Size() int

func (*Deregistration) XXX_Unmarshal

func (m *Deregistration) XXX_Unmarshal(b []byte) error

type Entity

type Entity struct {
	EntityClass    string         `protobuf:"bytes,1,opt,name=entity_class,json=entityClass,proto3" json:"entity_class"`
	System         System         `protobuf:"bytes,3,opt,name=system,proto3" json:"system"`
	Subscriptions  []string       `protobuf:"bytes,4,rep,name=subscriptions,proto3" json:"subscriptions"`
	LastSeen       int64          `protobuf:"varint,5,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen"`
	Deregister     bool           `protobuf:"varint,6,opt,name=deregister,proto3" json:"deregister"`
	Deregistration Deregistration `protobuf:"bytes,7,opt,name=deregistration,proto3" json:"deregistration"`
	User           string         `protobuf:"bytes,11,opt,name=user,proto3" json:"user,omitempty"`
	// ExtendedAttributes store serialized arbitrary JSON-encoded data
	ExtendedAttributes []byte `protobuf:"bytes,12,opt,name=extended_attributes,json=extendedAttributes,proto3" json:"-"`
	// Redact contains the fields to redact on the agent
	Redact []string `protobuf:"bytes,13,rep,name=redact,proto3" json:"redact,omitempty"`
	// Metadata contains the name, namespace, labels and annotations of the
	// entity
	ObjectMeta `protobuf:"bytes,14,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	// SensuAgentVersion is the sensu-agent version.
	SensuAgentVersion string `protobuf:"bytes,15,opt,name=sensu_agent_version,json=sensuAgentVersion,proto3" json:"sensu_agent_version"`
	// KeepaliveHandlers contains a list of handlers to use for the entity's
	// keepalive events
	KeepaliveHandlers    []string `protobuf:"bytes,16,rep,name=keepalive_handlers,json=keepaliveHandlers,proto3" json:"keepalive_handlers,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Entity is the Entity supplying the event. The default Entity for any Event is the running Agent process--if the Event is sent by an Agent.

func FixtureEntity

func FixtureEntity(name string) *Entity

FixtureEntity returns a testing fixture for an Entity object.

func NewEntity

func NewEntity(meta ObjectMeta) *Entity

NewEntity creates a new Entity.

func NewEntityFromFace

func NewEntityFromFace(that EntityFace) *Entity

func NewPopulatedEntity

func NewPopulatedEntity(r randyEntity, easy bool) *Entity

func (*Entity) Descriptor

func (*Entity) Descriptor() ([]byte, []int)

func (*Entity) Equal

func (this *Entity) Equal(that interface{}) bool

func (*Entity) Fields

func (e *Entity) Fields() map[string]string

Fields returns a set of fields that represent that resource

func (*Entity) GetDeregister

func (this *Entity) GetDeregister() bool

func (*Entity) GetDeregistration

func (this *Entity) GetDeregistration() Deregistration

func (*Entity) GetEntityClass

func (this *Entity) GetEntityClass() string

func (*Entity) GetExtendedAttributes

func (this *Entity) GetExtendedAttributes() []byte

func (*Entity) GetKeepaliveHandlers

func (this *Entity) GetKeepaliveHandlers() []string

func (*Entity) GetLastSeen

func (this *Entity) GetLastSeen() int64

func (*Entity) GetMetadata

func (e *Entity) GetMetadata() *ObjectMeta

func (*Entity) GetObjectMeta

func (this *Entity) GetObjectMeta() ObjectMeta

func (*Entity) GetRedact

func (this *Entity) GetRedact() []string

func (*Entity) GetRedactedEntity

func (e *Entity) GetRedactedEntity() *Entity

GetRedactedEntity redacts the entity according to the entity's Redact fields. A redacted copy is returned. The copy contains pointers to the original's memory, with different Labels and Annotations.

func (*Entity) GetSensuAgentVersion

func (this *Entity) GetSensuAgentVersion() string

func (*Entity) GetSubscriptions

func (this *Entity) GetSubscriptions() []string

func (*Entity) GetSystem

func (this *Entity) GetSystem() System

func (*Entity) GetUser

func (this *Entity) GetUser() string

func (*Entity) Marshal

func (m *Entity) Marshal() (dAtA []byte, err error)

func (*Entity) MarshalJSON

func (e *Entity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Entity) MarshalTo

func (m *Entity) MarshalTo(dAtA []byte) (int, error)

func (*Entity) MarshalToSizedBuffer

func (m *Entity) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Entity) Proto

func (*Entity) ProtoMessage

func (*Entity) ProtoMessage()

func (*Entity) RBACName

func (e *Entity) RBACName() string

RBACName is the rbac name of the resource.

func (*Entity) Reset

func (m *Entity) Reset()

func (*Entity) SetMetadata

func (e *Entity) SetMetadata(meta *ObjectMeta)

func (*Entity) SetName

func (e *Entity) SetName(name string)

SetName sets the name of the resource.

func (*Entity) SetNamespace

func (e *Entity) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*Entity) SetObjectMeta

func (e *Entity) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*Entity) Size

func (m *Entity) Size() (n int)

func (*Entity) StoreName

func (e *Entity) StoreName() string

func (*Entity) StorePrefix

func (e *Entity) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*Entity) String

func (m *Entity) String() string

func (*Entity) TestProto

func (*Entity) URIPath

func (e *Entity) URIPath() string

URIPath returns the path component of an entity URI.

func (*Entity) Unmarshal

func (m *Entity) Unmarshal(dAtA []byte) error

func (*Entity) Validate

func (e *Entity) Validate() error

Validate returns an error if the entity is invalid.

func (*Entity) XXX_DiscardUnknown

func (m *Entity) XXX_DiscardUnknown()

func (*Entity) XXX_Marshal

func (m *Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Entity) XXX_Merge

func (m *Entity) XXX_Merge(src proto.Message)

func (*Entity) XXX_Size

func (m *Entity) XXX_Size() int

func (*Entity) XXX_Unmarshal

func (m *Entity) XXX_Unmarshal(b []byte) error

type EntityFace

type EntityFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetEntityClass() string
	GetSystem() System
	GetSubscriptions() []string
	GetLastSeen() int64
	GetDeregister() bool
	GetDeregistration() Deregistration
	GetUser() string
	GetExtendedAttributes() []byte
	GetRedact() []string
	GetObjectMeta() ObjectMeta
	GetSensuAgentVersion() string
	GetKeepaliveHandlers() []string
}

type Event

type Event struct {
	// Timestamp is the time in seconds since the Epoch.
	Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Entity describes the entity in which the event occurred.
	Entity *Entity `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"`
	// Check describes the result of a check; if event is associated to check
	// execution.
	Check *Check `protobuf:"bytes,3,opt,name=check,proto3" json:"check,omitempty"`
	// Metrics are zero or more Sensu metrics
	Metrics *Metrics `protobuf:"bytes,4,opt,name=metrics,proto3" json:"metrics,omitempty"`
	// Metadata contains name, namespace, labels and annotations
	ObjectMeta `protobuf:"bytes,5,opt,name=metadata,proto3,embedded=metadata" json:"metadata"`
	// ID is the unique identifier of the event.
	ID []byte `protobuf:"bytes,6,opt,name=ID,proto3" json:"id"`
	// Sequence is the event sequence number. The agent increments the sequence
	// number by one for every successive event. When the agent restarts or
	// reconnects to another backend, the sequence number is reset to 1.
	Sequence int64 `protobuf:"varint,7,opt,name=Sequence,proto3" json:"sequence"`
	// Pipelines are the pipelines that should be used to process an event.
	// APIVersion should default to "core/v2" and Type should default to
	// "Pipeline".
	Pipelines            []*ResourceReference `protobuf:"bytes,8,rep,name=pipelines,proto3" json:"pipelines"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

An Event is the encapsulating type sent across the Sensu websocket transport.

func FixtureEvent

func FixtureEvent(entityName, checkID string) *Event

FixtureEvent returns a testing fixture for an Event object.

func NewEvent

func NewEvent(meta ObjectMeta) *Event

NewEvent creates a new Event.

func NewEventFromFace

func NewEventFromFace(that EventFace) *Event

func NewPopulatedEvent

func NewPopulatedEvent(r randyEvent, easy bool) *Event

func (*Event) Descriptor

func (*Event) Descriptor() ([]byte, []int)

func (*Event) Equal

func (this *Event) Equal(that interface{}) bool

func (*Event) Fields

func (e *Event) Fields() map[string]string

Fields returns a set of fields that represent that resource

func (*Event) GetCheck

func (this *Event) GetCheck() *Check

func (*Event) GetEntity

func (this *Event) GetEntity() *Entity

func (*Event) GetID

func (this *Event) GetID() []byte

func (*Event) GetMetadata

func (e *Event) GetMetadata() *ObjectMeta

func (*Event) GetMetrics

func (this *Event) GetMetrics() *Metrics

func (*Event) GetObjectMeta

func (this *Event) GetObjectMeta() ObjectMeta

func (*Event) GetPipelines

func (this *Event) GetPipelines() []*ResourceReference

func (*Event) GetSequence

func (this *Event) GetSequence() int64

func (*Event) GetTimestamp

func (this *Event) GetTimestamp() int64

func (*Event) GetUUID

func (e *Event) GetUUID() uuid.UUID

GetUUID parses a UUID from the ID bytes. It does not check errors, assuming that the event has already passed validation.

func (*Event) HasCheck

func (e *Event) HasCheck() bool

HasCheck determines if an event has check data.

func (*Event) HasCheckHandlers

func (e *Event) HasCheckHandlers() bool

HasCheckHandlers determines if an event has one or more check handlers.

func (*Event) HasHandlers

func (e *Event) HasHandlers() bool

HasHandlers determines if an event has one or more check or metric handlers.

func (*Event) HasMetricHandlers

func (e *Event) HasMetricHandlers() bool

HasMetricHandlers determines if an event has one or more metric handlers.

func (*Event) HasMetrics

func (e *Event) HasMetrics() bool

HasMetrics determines if an event has metric data.

func (*Event) IsFlappingEnd

func (e *Event) IsFlappingEnd() bool

IsFlappingEnd determines if an event stopped flapping on this occurrence.

func (*Event) IsFlappingStart

func (e *Event) IsFlappingStart() bool

IsFlappingStart determines if an event started flapping on this occurrence.

func (*Event) IsIncident

func (e *Event) IsIncident() bool

IsIncident determines if an event indicates an incident.

func (*Event) IsResolution

func (e *Event) IsResolution() bool

IsResolution returns true if an event has just transitionned from an incident

func (*Event) IsSilenced

func (e *Event) IsSilenced() bool

IsSilenced determines if an event has any silenced entries

func (*Event) IsSilencedBy

func (e *Event) IsSilencedBy(entry *Silenced) bool

IsSilencedBy returns true if given silence will silence the event.

func (*Event) LogFields

func (e *Event) LogFields(debug bool) map[string]interface{}

LogFields populates a map with fields containing relevant information about an event for logging

func (*Event) Marshal

func (m *Event) Marshal() (dAtA []byte, err error)

func (Event) MarshalJSON

func (e Event) MarshalJSON() ([]byte, error)

func (*Event) MarshalTo

func (m *Event) MarshalTo(dAtA []byte) (int, error)

func (*Event) MarshalToSizedBuffer

func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Event) Proto

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) RBACName

func (e *Event) RBACName() string

func (*Event) Reset

func (m *Event) Reset()

func (*Event) SetMetadata

func (e *Event) SetMetadata(meta *ObjectMeta)

func (*Event) SetNamespace

func (e *Event) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*Event) SetObjectMeta

func (e *Event) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*Event) SilencedBy

func (e *Event) SilencedBy(entries []*Silenced) []*Silenced

SilencedBy returns the subset of given silences, that silence the event.

func (*Event) Size

func (m *Event) Size() (n int)

func (*Event) StoreName

func (e *Event) StoreName() string

func (*Event) StorePrefix

func (e *Event) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*Event) String

func (m *Event) String() string

func (*Event) SynthesizeExtras

func (e *Event) SynthesizeExtras() map[string]interface{}

SynthesizeExtras implements dynamic.SynthesizeExtras

func (*Event) TestProto

func (*Event) URIPath

func (e *Event) URIPath() string

URIPath returns the path component of an event URI.

func (*Event) Unmarshal

func (m *Event) Unmarshal(dAtA []byte) error

func (*Event) UnmarshalJSON

func (e *Event) UnmarshalJSON(b []byte) error

func (*Event) Validate

func (e *Event) Validate() error

Validate returns an error if the event does not pass validation tests.

func (*Event) XXX_DiscardUnknown

func (m *Event) XXX_DiscardUnknown()

func (*Event) XXX_Marshal

func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Event) XXX_Merge

func (m *Event) XXX_Merge(src proto.Message)

func (*Event) XXX_Size

func (m *Event) XXX_Size() int

func (*Event) XXX_Unmarshal

func (m *Event) XXX_Unmarshal(b []byte) error

type EventFace

type EventFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetTimestamp() int64
	GetEntity() *Entity
	GetCheck() *Check
	GetMetrics() *Metrics
	GetObjectMeta() ObjectMeta
	GetID() []byte
	GetSequence() int64
	GetPipelines() []*ResourceReference
}

type EventFilter

type EventFilter struct {
	// Metadata contains the name, namespace, labels and annotations of the
	// filter
	ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	// Action specifies to allow/deny events to continue through the pipeline
	Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
	// Expressions is an array of boolean expressions that are &&'d together
	// to determine if the event matches this filter.
	Expressions []string `protobuf:"bytes,3,rep,name=expressions,proto3" json:"expressions"`
	// When indicates a TimeWindowWhen that a filter uses to filter by days &
	// times
	When *TimeWindowWhen `protobuf:"bytes,6,opt,name=when,proto3" json:"when,omitempty"`
	// Runtime assets are Sensu assets that contain javascript libraries. They
	// are evaluated within the execution context.
	RuntimeAssets        []string `protobuf:"bytes,8,rep,name=runtime_assets,json=runtimeAssets,proto3" json:"runtime_assets"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

EventFilter is a filter specification.

func FixtureDenyEventFilter

func FixtureDenyEventFilter(name string) *EventFilter

FixtureDenyEventFilter returns a Filter fixture for testing.

func FixtureEventFilter

func FixtureEventFilter(name string) *EventFilter

FixtureEventFilter returns a Filter fixture for testing.

func NewEventFilter

func NewEventFilter(meta ObjectMeta) *EventFilter

NewEventFilter creates a new EventFilter.

func NewEventFilterFromFace

func NewEventFilterFromFace(that EventFilterFace) *EventFilter

func NewPopulatedEventFilter

func NewPopulatedEventFilter(r randyFilter, easy bool) *EventFilter

func (*EventFilter) Descriptor

func (*EventFilter) Descriptor() ([]byte, []int)

func (*EventFilter) Equal

func (this *EventFilter) Equal(that interface{}) bool

func (*EventFilter) Fields

func (e *EventFilter) Fields() map[string]string

Fields returns a set of fields that represent that resource

func (*EventFilter) GetAction

func (this *EventFilter) GetAction() string

func (*EventFilter) GetExpressions

func (this *EventFilter) GetExpressions() []string

func (*EventFilter) GetMetadata

func (e *EventFilter) GetMetadata() *ObjectMeta

func (*EventFilter) GetObjectMeta

func (this *EventFilter) GetObjectMeta() ObjectMeta

func (*EventFilter) GetRuntimeAssets

func (this *EventFilter) GetRuntimeAssets() []string

func (*EventFilter) GetWhen

func (this *EventFilter) GetWhen() *TimeWindowWhen

func (*EventFilter) Marshal

func (m *EventFilter) Marshal() (dAtA []byte, err error)

func (*EventFilter) MarshalTo

func (m *EventFilter) MarshalTo(dAtA []byte) (int, error)

func (*EventFilter) MarshalToSizedBuffer

func (m *EventFilter) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventFilter) Proto

func (*EventFilter) ProtoMessage

func (*EventFilter) ProtoMessage()

func (*EventFilter) RBACName

func (f *EventFilter) RBACName() string

func (*EventFilter) Reset

func (m *EventFilter) Reset()

func (*EventFilter) SetMetadata

func (e *EventFilter) SetMetadata(meta *ObjectMeta)

func (*EventFilter) SetNamespace

func (f *EventFilter) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*EventFilter) SetObjectMeta

func (f *EventFilter) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*EventFilter) Size

func (m *EventFilter) Size() (n int)

func (*EventFilter) StoreName

func (e *EventFilter) StoreName() string

func (*EventFilter) StorePrefix

func (f *EventFilter) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*EventFilter) String

func (m *EventFilter) String() string

func (*EventFilter) TestProto

func (*EventFilter) URIPath

func (f *EventFilter) URIPath() string

URIPath returns the path component of an event filter URI.

func (*EventFilter) Unmarshal

func (m *EventFilter) Unmarshal(dAtA []byte) error

func (*EventFilter) Update

func (f *EventFilter) Update(from *EventFilter, fields ...string) error

Update updates e with selected fields. Returns non-nil error if any of the selected fields are unsupported.

func (*EventFilter) Validate

func (f *EventFilter) Validate() error

Validate returns an error if the filter does not pass validation tests.

func (*EventFilter) XXX_DiscardUnknown

func (m *EventFilter) XXX_DiscardUnknown()

func (*EventFilter) XXX_Marshal

func (m *EventFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventFilter) XXX_Merge

func (m *EventFilter) XXX_Merge(src proto.Message)

func (*EventFilter) XXX_Size

func (m *EventFilter) XXX_Size() int

func (*EventFilter) XXX_Unmarshal

func (m *EventFilter) XXX_Unmarshal(b []byte) error

type EventFilterFace

type EventFilterFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetObjectMeta() ObjectMeta
	GetAction() string
	GetExpressions() []string
	GetWhen() *TimeWindowWhen
	GetRuntimeAssets() []string
}

type Extension

type Extension struct {
	// Metadata contains the name, namespace, labels and annotations of the
	// extension
	ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	// URL is the URL of the gRPC service that implements the extension.
	URL                  string   `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Extension is a registered sensu extension.

func FixtureExtension

func FixtureExtension(name string) *Extension

FixtureExtension given a name returns a valid extension for use in tests

func NewExtension

func NewExtension(meta ObjectMeta) *Extension

NewExtension intializes an extension with the given object meta

func NewExtensionFromFace

func NewExtensionFromFace(that ExtensionFace) *Extension

func NewPopulatedExtension

func NewPopulatedExtension(r randyExtension, easy bool) *Extension

func (*Extension) Descriptor

func (*Extension) Descriptor() ([]byte, []int)

func (*Extension) Equal

func (this *Extension) Equal(that interface{}) bool

func (*Extension) Fields

func (e *Extension) Fields() map[string]string

ExtensionFields returns a set of fields that represent that resource

func (*Extension) GetMetadata

func (e *Extension) GetMetadata() *ObjectMeta

func (*Extension) GetObjectMeta

func (this *Extension) GetObjectMeta() ObjectMeta

func (*Extension) GetURL

func (this *Extension) GetURL() string

func (*Extension) Marshal

func (m *Extension) Marshal() (dAtA []byte, err error)

func (*Extension) MarshalTo

func (m *Extension) MarshalTo(dAtA []byte) (int, error)

func (*Extension) MarshalToSizedBuffer

func (m *Extension) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Extension) Proto

func (*Extension) ProtoMessage

func (*Extension) ProtoMessage()

func (*Extension) RBACName

func (e *Extension) RBACName() string

func (*Extension) Reset

func (m *Extension) Reset()

func (*Extension) SetMetadata

func (e *Extension) SetMetadata(meta *ObjectMeta)

func (*Extension) SetNamespace

func (e *Extension) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*Extension) SetObjectMeta

func (e *Extension) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*Extension) Size

func (m *Extension) Size() (n int)

func (*Extension) StoreName

func (e *Extension) StoreName() string

func (*Extension) StorePrefix

func (e *Extension) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*Extension) String

func (m *Extension) String() string

func (*Extension) TestProto

func (*Extension) URIPath

func (e *Extension) URIPath() string

URIPath returns the path component of an extension URI.

func (*Extension) Unmarshal

func (m *Extension) Unmarshal(dAtA []byte) error

func (*Extension) Validate

func (e *Extension) Validate() error

Validate validates the extension.

func (*Extension) XXX_DiscardUnknown

func (m *Extension) XXX_DiscardUnknown()

func (*Extension) XXX_Marshal

func (m *Extension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Extension) XXX_Merge

func (m *Extension) XXX_Merge(src proto.Message)

func (*Extension) XXX_Size

func (m *Extension) XXX_Size() int

func (*Extension) XXX_Unmarshal

func (m *Extension) XXX_Unmarshal(b []byte) error

type ExtensionFace

type ExtensionFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetObjectMeta() ObjectMeta
	GetURL() string
}

type Fielder

type Fielder interface {
	// Fields returns a set of fields that represent the resource.
	Fields() map[string]string
}

Fielder includes a set of fields that represent a resource.

type Handler

type Handler struct {
	// Metadata contains the name, namespace, labels and annotations of the
	// handler
	ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	// Type is the handler type, i.e. pipe.
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// Mutator is the handler event data mutator.
	Mutator string `protobuf:"bytes,3,opt,name=mutator,proto3" json:"mutator,omitempty"`
	// Command is the command to be executed for a pipe handler.
	Command string `protobuf:"bytes,4,opt,name=command,proto3" json:"command,omitempty"`
	// Timeout is the handler timeout in seconds.
	Timeout uint32 `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout"`
	// Socket contains configuration for a TCP or UDP handler.
	Socket *HandlerSocket `protobuf:"bytes,6,opt,name=socket,proto3" json:"socket,omitempty"`
	// Handlers is a list of handlers for a handler set.
	Handlers []string `protobuf:"bytes,7,rep,name=handlers,proto3" json:"handlers"`
	// Filters is a list of filters name to evaluate before executing this
	// handler
	Filters []string `protobuf:"bytes,8,rep,name=filters,proto3" json:"filters"`
	// EnvVars is a list of environment variables to use with command execution
	EnvVars []string `protobuf:"bytes,9,rep,name=env_vars,json=envVars,proto3" json:"env_vars"`
	// RuntimeAssets are a list of assets required to execute a handler.
	RuntimeAssets []string `protobuf:"bytes,13,rep,name=runtime_assets,json=runtimeAssets,proto3" json:"runtime_assets"`
	// Secrets is the list of Sensu secrets to set for the handler's
	// execution environment.
	Secrets              []*Secret `protobuf:"bytes,14,rep,name=secrets,proto3" json:"secrets"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

A Handler is a handler specification.

func FakeHandlerCommand

func FakeHandlerCommand(command string, args ...string) *Handler

FakeHandlerCommand takes a command and (optionally) command args and will execute the TestHelperHandlerProcess test within the package FakeHandlerCommand is called from.

func FixtureHandler

func FixtureHandler(name string) *Handler

FixtureHandler returns a Handler fixture for testing.

func FixtureSetHandler

func FixtureSetHandler(name string, handlers ...string) *Handler

FixtureSetHandler returns a Handler fixture for testing.

func FixtureSocketHandler

func FixtureSocketHandler(name string, proto string) *Handler

FixtureSocketHandler returns a Handler fixture for testing.

func NewHandler

func NewHandler(meta ObjectMeta) *Handler

NewHandler creates a new Handler.

func NewHandlerFromFace

func NewHandlerFromFace(that HandlerFace) *Handler

func NewPopulatedHandler

func NewPopulatedHandler(r randyHandler, easy bool) *Handler

func (*Handler) Descriptor

func (*Handler) Descriptor() ([]byte, []int)

func (*Handler) Equal

func (this *Handler) Equal(that interface{}) bool

func (*Handler) Fields

func (h *Handler) Fields() map[string]string

Fields returns a set of fields that represent that resource

func (*Handler) GetCommand

func (this *Handler) GetCommand() string

func (*Handler) GetEnvVars

func (this *Handler) GetEnvVars() []string

func (*Handler) GetFilters

func (this *Handler) GetFilters() []string

func (*Handler) GetHandlers

func (this *Handler) GetHandlers() []string

func (*Handler) GetMetadata

func (h *Handler) GetMetadata() *ObjectMeta

func (*Handler) GetMutator

func (this *Handler) GetMutator() string

func (*Handler) GetObjectMeta

func (this *Handler) GetObjectMeta() ObjectMeta

func (*Handler) GetRuntimeAssets

func (this *Handler) GetRuntimeAssets() []string

func (*Handler) GetSecrets

func (this *Handler) GetSecrets() []*Secret

func (*Handler) GetSocket

func (this *Handler) GetSocket() *HandlerSocket

func (*Handler) GetTimeout

func (this *Handler) GetTimeout() uint32

func (*Handler) GetType

func (this *Handler) GetType() string

func (*Handler) Marshal

func (m *Handler) Marshal() (dAtA []byte, err error)

func (*Handler) MarshalTo

func (m *Handler) MarshalTo(dAtA []byte) (int, error)

func (*Handler) MarshalToSizedBuffer

func (m *Handler) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Handler) Proto

func (*Handler) ProtoMessage

func (*Handler) ProtoMessage()

func (*Handler) RBACName

func (h *Handler) RBACName() string

func (*Handler) Reset

func (m *Handler) Reset()

func (*Handler) SetMetadata

func (h *Handler) SetMetadata(meta *ObjectMeta)

func (*Handler) SetNamespace

func (h *Handler) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*Handler) SetObjectMeta

func (h *Handler) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*Handler) Size

func (m *Handler) Size() (n int)

func (*Handler) StoreName

func (h *Handler) StoreName() string

func (*Handler) StorePrefix

func (h *Handler) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*Handler) String

func (m *Handler) String() string

func (*Handler) TestProto

func (*Handler) URIPath

func (h *Handler) URIPath() string

URIPath returns the path component of a handler URI.

func (*Handler) Unmarshal

func (m *Handler) Unmarshal(dAtA []byte) error

func (*Handler) Validate

func (h *Handler) Validate() error

Validate returns an error if the handler does not pass validation tests.

func (*Handler) XXX_DiscardUnknown

func (m *Handler) XXX_DiscardUnknown()

func (*Handler) XXX_Marshal

func (m *Handler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Handler) XXX_Merge

func (m *Handler) XXX_Merge(src proto.Message)

func (*Handler) XXX_Size

func (m *Handler) XXX_Size() int

func (*Handler) XXX_Unmarshal

func (m *Handler) XXX_Unmarshal(b []byte) error

type HandlerFace

type HandlerFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetObjectMeta() ObjectMeta
	GetType() string
	GetMutator() string
	GetCommand() string
	GetTimeout() uint32
	GetSocket() *HandlerSocket
	GetHandlers() []string
	GetFilters() []string
	GetEnvVars() []string
	GetRuntimeAssets() []string
	GetSecrets() []*Secret
}

type HandlerSocket

type HandlerSocket struct {
	// Host is the socket peer address.
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	// Port is the socket peer port.
	Port                 uint32   `protobuf:"varint,2,opt,name=port,proto3" json:"port"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

HandlerSocket contains configuration for a TCP or UDP handler.

func NewPopulatedHandlerSocket

func NewPopulatedHandlerSocket(r randyHandler, easy bool) *HandlerSocket

func (*HandlerSocket) Descriptor

func (*HandlerSocket) Descriptor() ([]byte, []int)

func (*HandlerSocket) Equal

func (this *HandlerSocket) Equal(that interface{}) bool

func (*HandlerSocket) GetHost

func (m *HandlerSocket) GetHost() string

func (*HandlerSocket) GetPort

func (m *HandlerSocket) GetPort() uint32

func (*HandlerSocket) Marshal

func (m *HandlerSocket) Marshal() (dAtA []byte, err error)

func (*HandlerSocket) MarshalTo

func (m *HandlerSocket) MarshalTo(dAtA []byte) (int, error)

func (*HandlerSocket) MarshalToSizedBuffer

func (m *HandlerSocket) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HandlerSocket) ProtoMessage

func (*HandlerSocket) ProtoMessage()

func (*HandlerSocket) Reset

func (m *HandlerSocket) Reset()

func (*HandlerSocket) Size

func (m *HandlerSocket) Size() (n int)

func (*HandlerSocket) String

func (m *HandlerSocket) String() string

func (*HandlerSocket) Unmarshal

func (m *HandlerSocket) Unmarshal(dAtA []byte) error

func (*HandlerSocket) Validate

func (s *HandlerSocket) Validate() error

Validate returns an error if the handler socket does not pass validation tests.

func (*HandlerSocket) XXX_DiscardUnknown

func (m *HandlerSocket) XXX_DiscardUnknown()

func (*HandlerSocket) XXX_Marshal

func (m *HandlerSocket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HandlerSocket) XXX_Merge

func (m *HandlerSocket) XXX_Merge(src proto.Message)

func (*HandlerSocket) XXX_Size

func (m *HandlerSocket) XXX_Size() int

func (*HandlerSocket) XXX_Unmarshal

func (m *HandlerSocket) XXX_Unmarshal(b []byte) error

type HealthResponse

type HealthResponse struct {
	// Alarms is the list of active etcd alarms.
	Alarms []*etcdserverpb.AlarmMember
	// ClusterHealth is the list of health status for every cluster member.
	ClusterHealth []*ClusterHealth
	// Header is the response header for the entire cluster response.
	Header *etcdserverpb.ResponseHeader
	// PostgresHealth is the list of health status for each postgres config.
	PostgresHealth []*PostgresHealth `json:"PostgresHealth,omitempty"`
}

HealthResponse contains cluster health and cluster alarms.

func FixtureHealthResponse

func FixtureHealthResponse(healthy bool) *HealthResponse

FixtureHealthResponse returns a HealthResponse fixture for testing.

type Hook

type Hook struct {
	// Config is the specification of a hook
	HookConfig `protobuf:"bytes,1,opt,name=config,proto3,embedded=config" json:""`
	// Duration of execution
	Duration float64 `protobuf:"fixed64,2,opt,name=duration,proto3" json:"duration,omitempty"`
	// Executed describes the time in which the hook request was executed
	Executed int64 `protobuf:"varint,3,opt,name=executed,proto3" json:"executed"`
	// Issued describes the time in which the hook request was issued
	Issued int64 `protobuf:"varint,4,opt,name=issued,proto3" json:"issued"`
	// Output from the execution of Command
	Output string `protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"`
	// Status is the exit status code produced by the hook
	Status               int32    `protobuf:"varint,6,opt,name=status,proto3" json:"status"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A Hook is a hook specification and optionally the results of the hook's execution.

func FixtureHook

func FixtureHook(id string) *Hook

FixtureHook returns a fixture for a Hook object.

func NewPopulatedHook

func NewPopulatedHook(r randyHook, easy bool) *Hook

func (*Hook) Descriptor

func (*Hook) Descriptor() ([]byte, []int)

func (*Hook) Equal

func (this *Hook) Equal(that interface{}) bool

func (*Hook) GetDuration

func (m *Hook) GetDuration() float64

func (*Hook) GetExecuted

func (m *Hook) GetExecuted() int64

func (*Hook) GetIssued

func (m *Hook) GetIssued() int64

func (*Hook) GetMetadata

func (h *Hook) GetMetadata() *ObjectMeta

func (*Hook) GetOutput

func (m *Hook) GetOutput() string

func (*Hook) GetStatus

func (m *Hook) GetStatus() int32

func (*Hook) Marshal

func (m *Hook) Marshal() (dAtA []byte, err error)

func (*Hook) MarshalTo

func (m *Hook) MarshalTo(dAtA []byte) (int, error)

func (*Hook) MarshalToSizedBuffer

func (m *Hook) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Hook) ProtoMessage

func (*Hook) ProtoMessage()

func (*Hook) RBACName

func (*Hook) RBACName() string

func (*Hook) Reset

func (m *Hook) Reset()

func (*Hook) SetMetadata

func (h *Hook) SetMetadata(meta *ObjectMeta)

func (*Hook) SetNamespace

func (h *Hook) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*Hook) Size

func (m *Hook) Size() (n int)

func (*Hook) StoreName

func (h *Hook) StoreName() string

func (*Hook) String

func (m *Hook) String() string

func (*Hook) URIPath

func (h *Hook) URIPath() string

URIPath returns the path component of a Hook URI.

func (*Hook) Unmarshal

func (m *Hook) Unmarshal(dAtA []byte) error

func (*Hook) Validate

func (h *Hook) Validate() error

Validate returns an error if the hook does not pass validation tests.

func (*Hook) XXX_DiscardUnknown

func (m *Hook) XXX_DiscardUnknown()

func (*Hook) XXX_Marshal

func (m *Hook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Hook) XXX_Merge

func (m *Hook) XXX_Merge(src proto.Message)

func (*Hook) XXX_Size

func (m *Hook) XXX_Size() int

func (*Hook) XXX_Unmarshal

func (m *Hook) XXX_Unmarshal(b []byte) error

type HookConfig

type HookConfig struct {
	// Metadata contains the name, namespace, labels and annotations of the hook
	ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	// Command is the command to be executed
	Command string `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"`
	// Timeout is the timeout, in seconds, at which the hook has to run
	Timeout uint32 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout"`
	// Stdin indicates if hook requests have stdin enabled
	Stdin bool `protobuf:"varint,4,opt,name=stdin,proto3" json:"stdin"`
	// RuntimeAssets are a list of assets required to execute hook.
	RuntimeAssets        []string `protobuf:"bytes,5,rep,name=runtime_assets,json=runtimeAssets,proto3" json:"runtime_assets"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

HookConfig is the specification of a hook

func FixtureHookConfig

func FixtureHookConfig(name string) *HookConfig

FixtureHookConfig returns a fixture for a HookConfig object.

func NewHookConfigFromFace

func NewHookConfigFromFace(that HookConfigFace) *HookConfig

func NewPopulatedHookConfig

func NewPopulatedHookConfig(r randyHook, easy bool) *HookConfig

func (*HookConfig) Descriptor

func (*HookConfig) Descriptor() ([]byte, []int)

func (*HookConfig) Equal

func (this *HookConfig) Equal(that interface{}) bool

func (*HookConfig) Fields

func (h *HookConfig) Fields() map[string]string

Fields returns a set of fields that represent that resource

func (*HookConfig) GetCommand

func (this *HookConfig) GetCommand() string

func (*HookConfig) GetMetadata

func (h *HookConfig) GetMetadata() *ObjectMeta

func (*HookConfig) GetObjectMeta

func (this *HookConfig) GetObjectMeta() ObjectMeta

func (*HookConfig) GetRuntimeAssets

func (this *HookConfig) GetRuntimeAssets() []string

func (*HookConfig) GetStdin

func (this *HookConfig) GetStdin() bool

func (*HookConfig) GetTimeout

func (this *HookConfig) GetTimeout() uint32

func (*HookConfig) Marshal

func (m *HookConfig) Marshal() (dAtA []byte, err error)

func (*HookConfig) MarshalTo

func (m *HookConfig) MarshalTo(dAtA []byte) (int, error)

func (*HookConfig) MarshalToSizedBuffer

func (m *HookConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HookConfig) Proto

func (*HookConfig) ProtoMessage

func (*HookConfig) ProtoMessage()

func (*HookConfig) RBACName

func (*HookConfig) RBACName() string

func (*HookConfig) Reset

func (m *HookConfig) Reset()

func (*HookConfig) SetMetadata

func (h *HookConfig) SetMetadata(meta *ObjectMeta)

func (*HookConfig) SetNamespace

func (c *HookConfig) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*HookConfig) SetObjectMeta

func (h *HookConfig) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*HookConfig) Size

func (m *HookConfig) Size() (n int)

func (*HookConfig) StoreName

func (h *HookConfig) StoreName() string

func (*HookConfig) StorePrefix

func (c *HookConfig) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*HookConfig) String

func (m *HookConfig) String() string

func (*HookConfig) TestProto

func (*HookConfig) URIPath

func (c *HookConfig) URIPath() string

URIPath returns the path component of a hook URI.

func (*HookConfig) Unmarshal

func (m *HookConfig) Unmarshal(dAtA []byte) error

func (*HookConfig) Validate

func (c *HookConfig) Validate() error

Validate returns an error if the hook does not pass validation tests.

func (*HookConfig) XXX_DiscardUnknown

func (m *HookConfig) XXX_DiscardUnknown()

func (*HookConfig) XXX_Marshal

func (m *HookConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HookConfig) XXX_Merge

func (m *HookConfig) XXX_Merge(src proto.Message)

func (*HookConfig) XXX_Size

func (m *HookConfig) XXX_Size() int

func (*HookConfig) XXX_Unmarshal

func (m *HookConfig) XXX_Unmarshal(b []byte) error

type HookConfigFace

type HookConfigFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetObjectMeta() ObjectMeta
	GetCommand() string
	GetTimeout() uint32
	GetStdin() bool
	GetRuntimeAssets() []string
}

type HookList

type HookList struct {
	// Hooks is the list of hooks for the check hook
	Hooks []string `protobuf:"bytes,1,rep,name=hooks,proto3" json:"hooks"`
	// Type indicates the type or response code for the check hook
	Type                 string   `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func FixtureHookList

func FixtureHookList(hookName string) *HookList

FixtureHookList returns a fixture for a HookList object.

func NewPopulatedHookList

func NewPopulatedHookList(r randyHook, easy bool) *HookList

func (*HookList) Descriptor

func (*HookList) Descriptor() ([]byte, []int)

func (*HookList) Equal

func (this *HookList) Equal(that interface{}) bool

func (*HookList) GetHooks

func (m *HookList) GetHooks() []string

func (*HookList) GetType

func (m *HookList) GetType() string

func (*HookList) Marshal

func (m *HookList) Marshal() (dAtA []byte, err error)

func (*HookList) MarshalJSON

func (h *HookList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*HookList) MarshalTo

func (m *HookList) MarshalTo(dAtA []byte) (int, error)

func (*HookList) MarshalToSizedBuffer

func (m *HookList) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HookList) ProtoMessage

func (*HookList) ProtoMessage()

func (*HookList) Reset

func (m *HookList) Reset()

func (*HookList) Size

func (m *HookList) Size() (n int)

func (*HookList) String

func (m *HookList) String() string

func (*HookList) Unmarshal

func (m *HookList) Unmarshal(dAtA []byte) error

func (*HookList) UnmarshalJSON

func (h *HookList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Marshaler interface.

func (*HookList) Validate

func (h *HookList) Validate() error

Validate returns an error if the check hook does not pass validation tests.

func (*HookList) XXX_DiscardUnknown

func (m *HookList) XXX_DiscardUnknown()

func (*HookList) XXX_Marshal

func (m *HookList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HookList) XXX_Merge

func (m *HookList) XXX_Merge(src proto.Message)

func (*HookList) XXX_Size

func (m *HookList) XXX_Size() int

func (*HookList) XXX_Unmarshal

func (m *HookList) XXX_Unmarshal(b []byte) error

type KeepaliveRecord

type KeepaliveRecord struct {
	// Metadata contains the name (of the entity), and namespace, labels and
	// annotations of the keepalive record
	ObjectMeta           `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	Time                 int64    `protobuf:"varint,4,opt,name=time,proto3" json:"time"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A KeepaliveRecord is a tuple of an entity name and the time at which the entity's keepalive will next expire.

func NewKeepaliveRecord

func NewKeepaliveRecord(e *Entity, t int64) *KeepaliveRecord

NewKeepaliveRecord initializes and returns a KeepaliveRecord from an entity and its expiration time.

func NewKeepaliveRecordFromFace

func NewKeepaliveRecordFromFace(that KeepaliveRecordFace) *KeepaliveRecord

func NewPopulatedKeepaliveRecord

func NewPopulatedKeepaliveRecord(r randyKeepalive, easy bool) *KeepaliveRecord

func (*KeepaliveRecord) Descriptor

func (*KeepaliveRecord) Descriptor() ([]byte, []int)

func (*KeepaliveRecord) Equal

func (this *KeepaliveRecord) Equal(that interface{}) bool

func (*KeepaliveRecord) GetObjectMeta

func (this *KeepaliveRecord) GetObjectMeta() ObjectMeta

func (*KeepaliveRecord) GetTime

func (this *KeepaliveRecord) GetTime() int64

func (*KeepaliveRecord) Marshal

func (m *KeepaliveRecord) Marshal() (dAtA []byte, err error)

func (*KeepaliveRecord) MarshalTo

func (m *KeepaliveRecord) MarshalTo(dAtA []byte) (int, error)

func (*KeepaliveRecord) MarshalToSizedBuffer

func (m *KeepaliveRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*KeepaliveRecord) Proto

func (*KeepaliveRecord) ProtoMessage

func (*KeepaliveRecord) ProtoMessage()

func (*KeepaliveRecord) Reset

func (m *KeepaliveRecord) Reset()

func (*KeepaliveRecord) Size

func (m *KeepaliveRecord) Size() (n int)

func (*KeepaliveRecord) String

func (m *KeepaliveRecord) String() string

func (*KeepaliveRecord) TestProto

func (*KeepaliveRecord) Unmarshal

func (m *KeepaliveRecord) Unmarshal(dAtA []byte) error

func (*KeepaliveRecord) XXX_DiscardUnknown

func (m *KeepaliveRecord) XXX_DiscardUnknown()

func (*KeepaliveRecord) XXX_Marshal

func (m *KeepaliveRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeepaliveRecord) XXX_Merge

func (m *KeepaliveRecord) XXX_Merge(src proto.Message)

func (*KeepaliveRecord) XXX_Size

func (m *KeepaliveRecord) XXX_Size() int

func (*KeepaliveRecord) XXX_Unmarshal

func (m *KeepaliveRecord) XXX_Unmarshal(b []byte) error

type KeepaliveRecordFace

type KeepaliveRecordFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetObjectMeta() ObjectMeta
	GetTime() int64
}

type MetricPoint

type MetricPoint struct {
	// The metric point name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The metric point value.
	Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value"`
	// The metric point timestamp, time in nanoseconds since the Epoch.
	Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp"`
	// Tags is a list of metric tags (dimensions).
	Tags                 []*MetricTag `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

A MetricPoint represents a single measurement.

func FixtureMetricPoint

func FixtureMetricPoint() *MetricPoint

FixtureMetricPoint returns a testing fixture for a Metric Point object.

func NewPopulatedMetricPoint

func NewPopulatedMetricPoint(r randyMetrics, easy bool) *MetricPoint

func (*MetricPoint) Descriptor

func (*MetricPoint) Descriptor() ([]byte, []int)

func (*MetricPoint) Equal

func (this *MetricPoint) Equal(that interface{}) bool

func (*MetricPoint) GetName

func (m *MetricPoint) GetName() string

func (*MetricPoint) GetTags

func (m *MetricPoint) GetTags() []*MetricTag

func (*MetricPoint) GetTimestamp

func (m *MetricPoint) GetTimestamp() int64

func (*MetricPoint) GetValue

func (m *MetricPoint) GetValue() float64

func (*MetricPoint) Marshal

func (m *MetricPoint) Marshal() (dAtA []byte, err error)

func (*MetricPoint) MarshalTo

func (m *MetricPoint) MarshalTo(dAtA []byte) (int, error)

func (*MetricPoint) MarshalToSizedBuffer

func (m *MetricPoint) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetricPoint) ProtoMessage

func (*MetricPoint) ProtoMessage()

func (*MetricPoint) Reset

func (m *MetricPoint) Reset()

func (*MetricPoint) Size

func (m *MetricPoint) Size() (n int)

func (*MetricPoint) String

func (m *MetricPoint) String() string

func (*MetricPoint) Unmarshal

func (m *MetricPoint) Unmarshal(dAtA []byte) error

func (*MetricPoint) XXX_DiscardUnknown

func (m *MetricPoint) XXX_DiscardUnknown()

func (*MetricPoint) XXX_Marshal

func (m *MetricPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetricPoint) XXX_Merge

func (m *MetricPoint) XXX_Merge(src proto.Message)

func (*MetricPoint) XXX_Size

func (m *MetricPoint) XXX_Size() int

func (*MetricPoint) XXX_Unmarshal

func (m *MetricPoint) XXX_Unmarshal(b []byte) error

type MetricTag

type MetricTag struct {
	// The metric tag name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The metric tag value.
	Value                string   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A MetricTag adds a dimension to a metric point.

func FixtureMetricTag

func FixtureMetricTag() *MetricTag

FixtureMetricTag returns a testing fixture for a Metric Tag object.

func NewPopulatedMetricTag

func NewPopulatedMetricTag(r randyMetrics, easy bool) *MetricTag

func (*MetricTag) Descriptor

func (*MetricTag) Descriptor() ([]byte, []int)

func (*MetricTag) Equal

func (this *MetricTag) Equal(that interface{}) bool

func (*MetricTag) GetName

func (m *MetricTag) GetName() string

func (*MetricTag) GetValue

func (m *MetricTag) GetValue() string

func (*MetricTag) Marshal

func (m *MetricTag) Marshal() (dAtA []byte, err error)

func (*MetricTag) MarshalTo

func (m *MetricTag) MarshalTo(dAtA []byte) (int, error)

func (*MetricTag) MarshalToSizedBuffer

func (m *MetricTag) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetricTag) ProtoMessage

func (*MetricTag) ProtoMessage()

func (*MetricTag) Reset

func (m *MetricTag) Reset()

func (*MetricTag) Size

func (m *MetricTag) Size() (n int)

func (*MetricTag) String

func (m *MetricTag) String() string

func (*MetricTag) Unmarshal

func (m *MetricTag) Unmarshal(dAtA []byte) error

func (*MetricTag) XXX_DiscardUnknown

func (m *MetricTag) XXX_DiscardUnknown()

func (*MetricTag) XXX_Marshal

func (m *MetricTag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetricTag) XXX_Merge

func (m *MetricTag) XXX_Merge(src proto.Message)

func (*MetricTag) XXX_Size

func (m *MetricTag) XXX_Size() int

func (*MetricTag) XXX_Unmarshal

func (m *MetricTag) XXX_Unmarshal(b []byte) error

type MetricThreshold

type MetricThreshold struct {
	// Name of the metric to match
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
	// Tag values to match with the metric
	Tags []*MetricThresholdTag `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags"`
	// Rules to evaluate when the filter matches a metric
	Thresholds []*MetricThresholdRule `protobuf:"bytes,3,rep,name=thresholds,proto3" json:"thresholds"`
	// The metric status if the measurement is missing
	NullStatus           uint32   `protobuf:"varint,4,opt,name=null_status,json=nullStatus,proto3" json:"null_status"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Represents an instance of a metric filter to evaluate

func NewPopulatedMetricThreshold

func NewPopulatedMetricThreshold(r randyMetricThreshold, easy bool) *MetricThreshold

func (*MetricThreshold) Descriptor

func (*MetricThreshold) Descriptor() ([]byte, []int)

func (*MetricThreshold) Equal

func (this *MetricThreshold) Equal(that interface{}) bool

func (*MetricThreshold) GetName

func (m *MetricThreshold) GetName() string

func (*MetricThreshold) GetNullStatus

func (m *MetricThreshold) GetNullStatus() uint32

func (*MetricThreshold) GetTags

func (m *MetricThreshold) GetTags() []*MetricThresholdTag

func (*MetricThreshold) GetThresholds

func (m *MetricThreshold) GetThresholds() []*MetricThresholdRule

func (*MetricThreshold) Marshal

func (m *MetricThreshold) Marshal() (dAtA []byte, err error)

func (*MetricThreshold) MarshalTo

func (m *MetricThreshold) MarshalTo(dAtA []byte) (int, error)

func (*MetricThreshold) MarshalToSizedBuffer

func (m *MetricThreshold) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetricThreshold) MatchesMetricPoint

func (m *MetricThreshold) MatchesMetricPoint(metric *MetricPoint) bool

func (*MetricThreshold) ProtoMessage

func (*MetricThreshold) ProtoMessage()

func (*MetricThreshold) Reset

func (m *MetricThreshold) Reset()

func (*MetricThreshold) Size

func (m *MetricThreshold) Size() (n int)

func (*MetricThreshold) String

func (m *MetricThreshold) String() string

func (*MetricThreshold) Unmarshal

func (m *MetricThreshold) Unmarshal(dAtA []byte) error

func (*MetricThreshold) Validate

func (m *MetricThreshold) Validate() error

Validate returns an error if the MetricThreshold does not pass validation tests.

func (*MetricThreshold) XXX_DiscardUnknown

func (m *MetricThreshold) XXX_DiscardUnknown()

func (*MetricThreshold) XXX_Marshal

func (m *MetricThreshold) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetricThreshold) XXX_Merge

func (m *MetricThreshold) XXX_Merge(src proto.Message)

func (*MetricThreshold) XXX_Size

func (m *MetricThreshold) XXX_Size() int

func (*MetricThreshold) XXX_Unmarshal

func (m *MetricThreshold) XXX_Unmarshal(b []byte) error

type MetricThresholdRule

type MetricThresholdRule struct {
	// Minimum value for the metric to be considered ok
	Min string `protobuf:"bytes,1,opt,name=min,proto3" json:"min"`
	// Maximum value for the metric to be considered ok
	Max string `protobuf:"bytes,2,opt,name=max,proto3" json:"max"`
	// The status of the metric if the value is below the minimum or above the maximum
	Status               uint32   `protobuf:"varint,3,opt,name=status,proto3" json:"status"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A rule to apply to a metric to determine its status

func NewPopulatedMetricThresholdRule

func NewPopulatedMetricThresholdRule(r randyMetricThreshold, easy bool) *MetricThresholdRule

func (*MetricThresholdRule) Descriptor

func (*MetricThresholdRule) Descriptor() ([]byte, []int)

func (*MetricThresholdRule) Equal

func (this *MetricThresholdRule) Equal(that interface{}) bool

func (*MetricThresholdRule) GetMax

func (m *MetricThresholdRule) GetMax() string

func (*MetricThresholdRule) GetMin

func (m *MetricThresholdRule) GetMin() string

func (*MetricThresholdRule) GetStatus

func (m *MetricThresholdRule) GetStatus() uint32

func (*MetricThresholdRule) Marshal

func (m *MetricThresholdRule) Marshal() (dAtA []byte, err error)

func (*MetricThresholdRule) MarshalTo

func (m *MetricThresholdRule) MarshalTo(dAtA []byte) (int, error)

func (*MetricThresholdRule) MarshalToSizedBuffer

func (m *MetricThresholdRule) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetricThresholdRule) ProtoMessage

func (*MetricThresholdRule) ProtoMessage()

func (*MetricThresholdRule) Reset

func (m *MetricThresholdRule) Reset()

func (*MetricThresholdRule) Size

func (m *MetricThresholdRule) Size() (n int)

func (*MetricThresholdRule) String

func (m *MetricThresholdRule) String() string

func (*MetricThresholdRule) Unmarshal

func (m *MetricThresholdRule) Unmarshal(dAtA []byte) error

func (*MetricThresholdRule) Validate

func (r *MetricThresholdRule) Validate() error

Validate returns an error if the MetricThresholdRule does not pass validation tests.

func (*MetricThresholdRule) XXX_DiscardUnknown

func (m *MetricThresholdRule) XXX_DiscardUnknown()

func (*MetricThresholdRule) XXX_Marshal

func (m *MetricThresholdRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetricThresholdRule) XXX_Merge

func (m *MetricThresholdRule) XXX_Merge(src proto.Message)

func (*MetricThresholdRule) XXX_Size

func (m *MetricThresholdRule) XXX_Size() int

func (*MetricThresholdRule) XXX_Unmarshal

func (m *MetricThresholdRule) XXX_Unmarshal(b []byte) error

type MetricThresholdTag

type MetricThresholdTag struct {
	// Name of the metric tag to match
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
	// Value of the metric tag to match
	Value                string   `protobuf:"bytes,2,opt,name=value,proto3" json:"value"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Represents the measurement tags to match

func NewPopulatedMetricThresholdTag

func NewPopulatedMetricThresholdTag(r randyMetricThreshold, easy bool) *MetricThresholdTag

func (*MetricThresholdTag) Descriptor

func (*MetricThresholdTag) Descriptor() ([]byte, []int)

func (*MetricThresholdTag) Equal

func (this *MetricThresholdTag) Equal(that interface{}) bool

func (*MetricThresholdTag) GetName

func (m *MetricThresholdTag) GetName() string

func (*MetricThresholdTag) GetValue

func (m *MetricThresholdTag) GetValue() string

func (*MetricThresholdTag) Marshal

func (m *MetricThresholdTag) Marshal() (dAtA []byte, err error)

func (*MetricThresholdTag) MarshalTo

func (m *MetricThresholdTag) MarshalTo(dAtA []byte) (int, error)

func (*MetricThresholdTag) MarshalToSizedBuffer

func (m *MetricThresholdTag) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetricThresholdTag) ProtoMessage

func (*MetricThresholdTag) ProtoMessage()

func (*MetricThresholdTag) Reset

func (m *MetricThresholdTag) Reset()

func (*MetricThresholdTag) Size

func (m *MetricThresholdTag) Size() (n int)

func (*MetricThresholdTag) String

func (m *MetricThresholdTag) String() string

func (*MetricThresholdTag) Unmarshal

func (m *MetricThresholdTag) Unmarshal(dAtA []byte) error

func (*MetricThresholdTag) Validate

func (t *MetricThresholdTag) Validate() error

Validate returns an error if the MetricThresholdTag does not pass validation tests.

func (*MetricThresholdTag) XXX_DiscardUnknown

func (m *MetricThresholdTag) XXX_DiscardUnknown()

func (*MetricThresholdTag) XXX_Marshal

func (m *MetricThresholdTag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetricThresholdTag) XXX_Merge

func (m *MetricThresholdTag) XXX_Merge(src proto.Message)

func (*MetricThresholdTag) XXX_Size

func (m *MetricThresholdTag) XXX_Size() int

func (*MetricThresholdTag) XXX_Unmarshal

func (m *MetricThresholdTag) XXX_Unmarshal(b []byte) error

type MetricThresholds

type MetricThresholds []*MetricThreshold

func (MetricThresholds) Validate

func (mt MetricThresholds) Validate() error

type Metrics

type Metrics struct {
	// Handlers is a list of handlers for the metric points.
	Handlers []string `protobuf:"bytes,1,rep,name=handlers,proto3" json:"handlers"`
	// Points is a list of metric points (measurements).
	Points               []*MetricPoint `protobuf:"bytes,2,rep,name=points,proto3" json:"points"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

A Metrics is an event metrics payload specification.

func FixtureMetrics

func FixtureMetrics() *Metrics

FixtureMetrics returns a testing fixture for a Metrics object.

func NewPopulatedMetrics

func NewPopulatedMetrics(r randyMetrics, easy bool) *Metrics

func (*Metrics) Descriptor

func (*Metrics) Descriptor() ([]byte, []int)

func (*Metrics) Equal

func (this *Metrics) Equal(that interface{}) bool

func (*Metrics) GetHandlers

func (m *Metrics) GetHandlers() []string

func (*Metrics) GetPoints

func (m *Metrics) GetPoints() []*MetricPoint

func (*Metrics) Marshal

func (m *Metrics) Marshal() (dAtA []byte, err error)

func (*Metrics) MarshalTo

func (m *Metrics) MarshalTo(dAtA []byte) (int, error)

func (*Metrics) MarshalToSizedBuffer

func (m *Metrics) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Metrics) ProtoMessage

func (*Metrics) ProtoMessage()

func (*Metrics) Reset

func (m *Metrics) Reset()

func (*Metrics) Size

func (m *Metrics) Size() (n int)

func (*Metrics) String

func (m *Metrics) String() string

func (*Metrics) Unmarshal

func (m *Metrics) Unmarshal(dAtA []byte) error

func (*Metrics) Validate

func (m *Metrics) Validate() error

Validate returns an error if metrics does not pass validation tests.

func (*Metrics) XXX_DiscardUnknown

func (m *Metrics) XXX_DiscardUnknown()

func (*Metrics) XXX_Marshal

func (m *Metrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Metrics) XXX_Merge

func (m *Metrics) XXX_Merge(src proto.Message)

func (*Metrics) XXX_Size

func (m *Metrics) XXX_Size() int

func (*Metrics) XXX_Unmarshal

func (m *Metrics) XXX_Unmarshal(b []byte) error

type MultitenantResource

type MultitenantResource interface {
	GetNamespace() string
}

MultitenantResource is a object that belongs to a namespace

type Mutator

type Mutator struct {
	// Metadata contains the name, namespace, labels and annotations of the
	// mutator
	ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	// Command is the command to be executed.
	Command string `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"`
	// Timeout is the command execution timeout in seconds.
	Timeout uint32 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout"`
	// Env is a list of environment variables to use with command execution
	EnvVars []string `protobuf:"bytes,4,rep,name=env_vars,json=envVars,proto3" json:"env_vars"`
	// RuntimeAssets are a list of assets required to execute a mutator.
	RuntimeAssets []string `protobuf:"bytes,8,rep,name=runtime_assets,json=runtimeAssets,proto3" json:"runtime_assets"`
	// Secrets is the list of Sensu secrets to set for the mutators's
	// execution environment.
	Secrets []*Secret `protobuf:"bytes,9,rep,name=secrets,proto3" json:"secrets"`
	// Type specifies the type of the mutator. If blank or set to "pipe", the
	// mutator will execute a command with the default shell of the sensu user.
	// If set to "javascript", the eval field will be used, interpreted as ECMAScript 5
	// and run on the Otto VM. The runtime assets will be assumed to be javascript
	// assets, and the environment variables will be made available to the global
	// environment of the mutator.
	Type string `protobuf:"bytes,10,opt,name=type,proto3" json:"type,omitempty"`
	// When the type of the mutator is "javascript", the eval field will be expected
	// to hold a valid ECMAScript 5 expression.
	Eval                 string   `protobuf:"bytes,11,opt,name=eval,proto3" json:"eval,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A Mutator is a mutator specification.

func FakeMutatorCommand

func FakeMutatorCommand(command string, args ...string) *Mutator

FakeMutatorCommand takes a command and (optionally) command args and will execute the TestHelperMutatorProcess test within the package FakeMutatorCommand is called from.

func FixtureMutator

func FixtureMutator(name string) *Mutator

FixtureMutator returns a Mutator fixture for testing.

func NewMutator

func NewMutator(meta ObjectMeta) *Mutator

NewMutator creates a new Mutator.

func NewMutatorFromFace

func NewMutatorFromFace(that MutatorFace) *Mutator

func NewPopulatedMutator

func NewPopulatedMutator(r randyMutator, easy bool) *Mutator

func (*Mutator) Descriptor

func (*Mutator) Descriptor() ([]byte, []int)

func (*Mutator) Equal

func (this *Mutator) Equal(that interface{}) bool

func (*Mutator) Fields

func (m *Mutator) Fields() map[string]string

Fields returns a set of fields that represent that resource

func (*Mutator) GetCommand

func (this *Mutator) GetCommand() string

func (*Mutator) GetEnvVars

func (this *Mutator) GetEnvVars() []string

func (*Mutator) GetEval

func (this *Mutator) GetEval() string

func (*Mutator) GetMetadata

func (m *Mutator) GetMetadata() *ObjectMeta

func (*Mutator) GetObjectMeta

func (this *Mutator) GetObjectMeta() ObjectMeta

func (*Mutator) GetRuntimeAssets

func (this *Mutator) GetRuntimeAssets() []string

func (*Mutator) GetSecrets

func (this *Mutator) GetSecrets() []*Secret

func (*Mutator) GetTimeout

func (this *Mutator) GetTimeout() uint32

func (*Mutator) GetType

func (this *Mutator) GetType() string

func (*Mutator) Marshal

func (m *Mutator) Marshal() (dAtA []byte, err error)

func (*Mutator) MarshalTo

func (m *Mutator) MarshalTo(dAtA []byte) (int, error)

func (*Mutator) MarshalToSizedBuffer

func (m *Mutator) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Mutator) Proto

func (*Mutator) ProtoMessage

func (*Mutator) ProtoMessage()

func (*Mutator) RBACName

func (m *Mutator) RBACName() string

func (*Mutator) Reset

func (m *Mutator) Reset()

func (*Mutator) SetMetadata

func (m *Mutator) SetMetadata(meta *ObjectMeta)

func (*Mutator) SetNamespace

func (m *Mutator) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*Mutator) SetObjectMeta

func (m *Mutator) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*Mutator) Size

func (m *Mutator) Size() (n int)

func (*Mutator) StoreName

func (m *Mutator) StoreName() string

func (*Mutator) StorePrefix

func (m *Mutator) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*Mutator) String

func (m *Mutator) String() string

func (*Mutator) TestProto

func (*Mutator) URIPath

func (m *Mutator) URIPath() string

URIPath returns the path component of a mutator URI.

func (*Mutator) Unmarshal

func (m *Mutator) Unmarshal(dAtA []byte) error

func (*Mutator) Update

func (m *Mutator) Update(from *Mutator, fields ...string) error

Update updates m with selected fields. Returns non-nil error if any of the selected fields are unsupported.

func (*Mutator) Validate

func (m *Mutator) Validate() error

Validate returns an error if the mutator does not pass validation tests.

func (*Mutator) XXX_DiscardUnknown

func (m *Mutator) XXX_DiscardUnknown()

func (*Mutator) XXX_Marshal

func (m *Mutator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Mutator) XXX_Merge

func (m *Mutator) XXX_Merge(src proto.Message)

func (*Mutator) XXX_Size

func (m *Mutator) XXX_Size() int

func (*Mutator) XXX_Unmarshal

func (m *Mutator) XXX_Unmarshal(b []byte) error

type MutatorFace

type MutatorFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetObjectMeta() ObjectMeta
	GetCommand() string
	GetTimeout() uint32
	GetEnvVars() []string
	GetRuntimeAssets() []string
	GetSecrets() []*Secret
	GetType() string
	GetEval() string
}

type Namespace

type Namespace struct {
	// Name is the unique identifier for a namespace.
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Namespace represents a virtual cluster

func FixtureNamespace

func FixtureNamespace(name string) *Namespace

FixtureNamespace returns a mocked namespace

func NewPopulatedNamespace

func NewPopulatedNamespace(r randyNamespace, easy bool) *Namespace

func (*Namespace) Descriptor

func (*Namespace) Descriptor() ([]byte, []int)

func (*Namespace) Equal

func (this *Namespace) Equal(that interface{}) bool

func (*Namespace) Fields

func (n *Namespace) Fields() map[string]string

Fields returns a set of fields that represent that resource

func (*Namespace) GetName

func (m *Namespace) GetName() string

func (*Namespace) GetObjectMeta

func (n *Namespace) GetObjectMeta() ObjectMeta

GetObjectMeta only exists here to fulfil the requirements of Resource

func (*Namespace) Marshal

func (m *Namespace) Marshal() (dAtA []byte, err error)

func (*Namespace) MarshalTo

func (m *Namespace) MarshalTo(dAtA []byte) (int, error)

func (*Namespace) MarshalToSizedBuffer

func (m *Namespace) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Namespace) ProtoMessage

func (*Namespace) ProtoMessage()

func (*Namespace) RBACName

func (n *Namespace) RBACName() string

func (*Namespace) Reset

func (m *Namespace) Reset()

func (*Namespace) SetNamespace

func (n *Namespace) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*Namespace) SetObjectMeta

func (n *Namespace) SetObjectMeta(meta ObjectMeta)

SetObjectMeta only exists here to fulfil the requirements of Resource

func (*Namespace) Size

func (m *Namespace) Size() (n int)

func (*Namespace) StorePrefix

func (n *Namespace) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*Namespace) String

func (m *Namespace) String() string

func (*Namespace) URIPath

func (n *Namespace) URIPath() string

URIPath returns the path component of a Namespace URI.

func (*Namespace) Unmarshal

func (m *Namespace) Unmarshal(dAtA []byte) error

func (*Namespace) Validate

func (n *Namespace) Validate() error

Validate returns an error if the namespace does not pass validation tests

func (*Namespace) XXX_DiscardUnknown

func (m *Namespace) XXX_DiscardUnknown()

func (*Namespace) XXX_Marshal

func (m *Namespace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Namespace) XXX_Merge

func (m *Namespace) XXX_Merge(src proto.Message)

func (*Namespace) XXX_Size

func (m *Namespace) XXX_Size() int

func (*Namespace) XXX_Unmarshal

func (m *Namespace) XXX_Unmarshal(b []byte) error

type Network

type Network struct {
	Interfaces           []NetworkInterface `protobuf:"bytes,1,rep,name=interfaces,proto3" json:"interfaces"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

Network contains information about the system network interfaces that the Agent process is running on, used for additional Entity context.

func NewPopulatedNetwork

func NewPopulatedNetwork(r randyEntity, easy bool) *Network

func (*Network) Descriptor

func (*Network) Descriptor() ([]byte, []int)

func (*Network) Equal

func (this *Network) Equal(that interface{}) bool

func (*Network) GetInterfaces

func (m *Network) GetInterfaces() []NetworkInterface

func (*Network) Marshal

func (m *Network) Marshal() (dAtA []byte, err error)

func (*Network) MarshalTo

func (m *Network) MarshalTo(dAtA []byte) (int, error)

func (*Network) MarshalToSizedBuffer

func (m *Network) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Network) ProtoMessage

func (*Network) ProtoMessage()

func (*Network) Reset

func (m *Network) Reset()

func (*Network) Size

func (m *Network) Size() (n int)

func (*Network) String

func (m *Network) String() string

func (*Network) Unmarshal

func (m *Network) Unmarshal(dAtA []byte) error

func (*Network) XXX_DiscardUnknown

func (m *Network) XXX_DiscardUnknown()

func (*Network) XXX_Marshal

func (m *Network) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Network) XXX_Merge

func (m *Network) XXX_Merge(src proto.Message)

func (*Network) XXX_Size

func (m *Network) XXX_Size() int

func (*Network) XXX_Unmarshal

func (m *Network) XXX_Unmarshal(b []byte) error

type NetworkInterface

type NetworkInterface struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	MAC                  string   `protobuf:"bytes,2,opt,name=mac,proto3" json:"mac,omitempty"`
	Addresses            []string `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

NetworkInterface contains information about a system network interface.

func NewPopulatedNetworkInterface

func NewPopulatedNetworkInterface(r randyEntity, easy bool) *NetworkInterface

func (*NetworkInterface) Descriptor

func (*NetworkInterface) Descriptor() ([]byte, []int)

func (*NetworkInterface) Equal

func (this *NetworkInterface) Equal(that interface{}) bool

func (*NetworkInterface) GetAddresses

func (m *NetworkInterface) GetAddresses() []string

func (*NetworkInterface) GetMAC

func (m *NetworkInterface) GetMAC() string

func (*NetworkInterface) GetName

func (m *NetworkInterface) GetName() string

func (*NetworkInterface) Marshal

func (m *NetworkInterface) Marshal() (dAtA []byte, err error)

func (*NetworkInterface) MarshalTo

func (m *NetworkInterface) MarshalTo(dAtA []byte) (int, error)

func (*NetworkInterface) MarshalToSizedBuffer

func (m *NetworkInterface) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NetworkInterface) ProtoMessage

func (*NetworkInterface) ProtoMessage()

func (*NetworkInterface) Reset

func (m *NetworkInterface) Reset()

func (*NetworkInterface) Size

func (m *NetworkInterface) Size() (n int)

func (*NetworkInterface) String

func (m *NetworkInterface) String() string

func (*NetworkInterface) Unmarshal

func (m *NetworkInterface) Unmarshal(dAtA []byte) error

func (*NetworkInterface) XXX_DiscardUnknown

func (m *NetworkInterface) XXX_DiscardUnknown()

func (*NetworkInterface) XXX_Marshal

func (m *NetworkInterface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NetworkInterface) XXX_Merge

func (m *NetworkInterface) XXX_Merge(src proto.Message)

func (*NetworkInterface) XXX_Size

func (m *NetworkInterface) XXX_Size() int

func (*NetworkInterface) XXX_Unmarshal

func (m *NetworkInterface) XXX_Unmarshal(b []byte) error

type ObjectMeta

type ObjectMeta struct {
	// Name must be unique within a namespace. Name is primarily intended for
	// creation idempotence and configuration definition.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" yaml: "name,omitempty"`
	// Namespace defines a logical grouping of objects within which each object
	// name must be unique.
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty" yaml: "namespace,omitempty"`
	// Map of string keys and values that can be used to organize and categorize
	// (scope and select) objects. May also be used in filters and token
	// substitution.
	// TODO: Link to Sensu documentation.
	// More info: http://kubernetes.io/docs/user-guide/labels
	Labels map[string]string `` /* 179-byte string literal not displayed */
	// Annotations is an unstructured key value map stored with a resource that
	// may be set by external tools to store and retrieve arbitrary metadata. They
	// are not queryable and should be preserved when modifying objects.
	// TODO: Link to Sensu documentation.
	// More info: http://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `` /* 193-byte string literal not displayed */
	// CreatedBy indicates which user created the resource.
	CreatedBy            string   `protobuf:"bytes,5,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty" yaml: "created_by,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ObjectMeta is metadata all persisted objects have.

func NewObjectMeta

func NewObjectMeta(name, namespace string) ObjectMeta

NewObjectMeta makes a new ObjectMeta, with Labels and Annotations assigned empty maps.

func NewObjectMetaP

func NewObjectMetaP(name, namespace string) *ObjectMeta

NewObjectMetaP is the pointer-returning version of NewObjectMeta.

func NewPopulatedObjectMeta

func NewPopulatedObjectMeta(r randyMeta, easy bool) *ObjectMeta

func (*ObjectMeta) AddAnnotation

func (o *ObjectMeta) AddAnnotation(key, value string)

AddAnnotation safely adds an annotation to this ObjectMeta, creating the map if necessary

func (*ObjectMeta) AddLabel

func (o *ObjectMeta) AddLabel(key, value string)

AddLabel safely adds a label to this ObjectMeta, creating the map if necessary

func (*ObjectMeta) Cmp

func (o *ObjectMeta) Cmp(other *ObjectMeta) Comparison

Cmp compares this ObjectMeta with another ObjectMeta.

func (*ObjectMeta) Descriptor

func (*ObjectMeta) Descriptor() ([]byte, []int)

func (*ObjectMeta) Equal

func (this *ObjectMeta) Equal(that interface{}) bool

func (*ObjectMeta) GetAnnotations

func (m *ObjectMeta) GetAnnotations() map[string]string

func (*ObjectMeta) GetCreatedBy

func (m *ObjectMeta) GetCreatedBy() string

func (*ObjectMeta) GetLabels

func (m *ObjectMeta) GetLabels() map[string]string

func (*ObjectMeta) GetName

func (m *ObjectMeta) GetName() string

func (*ObjectMeta) GetNamespace

func (m *ObjectMeta) GetNamespace() string

func (*ObjectMeta) Marshal

func (m *ObjectMeta) Marshal() (dAtA []byte, err error)

func (*ObjectMeta) MarshalTo

func (m *ObjectMeta) MarshalTo(dAtA []byte) (int, error)

func (*ObjectMeta) MarshalToSizedBuffer

func (m *ObjectMeta) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ObjectMeta) ProtoMessage

func (*ObjectMeta) ProtoMessage()

func (*ObjectMeta) Reset

func (m *ObjectMeta) Reset()

func (*ObjectMeta) Size

func (m *ObjectMeta) Size() (n int)

func (*ObjectMeta) String

func (m *ObjectMeta) String() string

func (*ObjectMeta) Unmarshal

func (m *ObjectMeta) Unmarshal(dAtA []byte) error

func (*ObjectMeta) XXX_DiscardUnknown

func (m *ObjectMeta) XXX_DiscardUnknown()

func (*ObjectMeta) XXX_Marshal

func (m *ObjectMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ObjectMeta) XXX_Merge

func (m *ObjectMeta) XXX_Merge(src proto.Message)

func (*ObjectMeta) XXX_Size

func (m *ObjectMeta) XXX_Size() int

func (*ObjectMeta) XXX_Unmarshal

func (m *ObjectMeta) XXX_Unmarshal(b []byte) error

type Pipeline

type Pipeline struct {
	// Metadata contains the name, namespace, labels and annotations of the
	// pipeline.
	ObjectMeta `protobuf:"bytes,1,opt,name=Metadata,proto3,embedded=Metadata" json:"metadata,omitempty"`
	// Workflows contains one or more pipeline workflows.
	Workflows            []*PipelineWorkflow `protobuf:"bytes,2,rep,name=Workflows,proto3" json:"workflows" yaml: "workflows"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

Pipeline represents a named collection of pipeline workflows.

func FixturePipeline

func FixturePipeline(name, namespace string) *Pipeline

FixturePipeline returns a testing fixture for a Pipeline object.

func NewPopulatedPipeline

func NewPopulatedPipeline(r randyPipeline, easy bool) *Pipeline

func (*Pipeline) Descriptor

func (*Pipeline) Descriptor() ([]byte, []int)

func (*Pipeline) Equal

func (this *Pipeline) Equal(that interface{}) bool

func (*Pipeline) Fields

func (p *Pipeline) Fields() map[string]string

Fields returns a set of fields that represent that resource.

func (*Pipeline) GetMetadata

func (p *Pipeline) GetMetadata() *ObjectMeta

func (*Pipeline) GetObjectMeta

func (p *Pipeline) GetObjectMeta() ObjectMeta

GetObjectMeta returns the object metadata for the resource.

func (*Pipeline) GetWorkflows

func (m *Pipeline) GetWorkflows() []*PipelineWorkflow

func (*Pipeline) Marshal

func (m *Pipeline) Marshal() (dAtA []byte, err error)

func (*Pipeline) MarshalTo

func (m *Pipeline) MarshalTo(dAtA []byte) (int, error)

func (*Pipeline) MarshalToSizedBuffer

func (m *Pipeline) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Pipeline) ProtoMessage

func (*Pipeline) ProtoMessage()

func (*Pipeline) RBACName

func (p *Pipeline) RBACName() string

RBACName describes the name of the resource for RBAC purposes.

func (*Pipeline) Reset

func (m *Pipeline) Reset()

func (*Pipeline) SetMetadata

func (p *Pipeline) SetMetadata(meta *ObjectMeta)

func (*Pipeline) SetNamespace

func (p *Pipeline) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*Pipeline) SetObjectMeta

func (p *Pipeline) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the object metadata for the resource.

func (*Pipeline) Size

func (m *Pipeline) Size() (n int)

func (*Pipeline) StoreName

func (p *Pipeline) StoreName() string

func (*Pipeline) StorePrefix

func (p *Pipeline) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store.

func (*Pipeline) String

func (m *Pipeline) String() string

func (*Pipeline) URIPath

func (p *Pipeline) URIPath() string

URIPath gives the path component of a pipeline URI.

func (*Pipeline) Unmarshal

func (m *Pipeline) Unmarshal(dAtA []byte) error

func (*Pipeline) Validate

func (p *Pipeline) Validate() error

Validate checks if a pipeline resource passes validation rules.

func (*Pipeline) XXX_DiscardUnknown

func (m *Pipeline) XXX_DiscardUnknown()

func (*Pipeline) XXX_Marshal

func (m *Pipeline) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Pipeline) XXX_Merge

func (m *Pipeline) XXX_Merge(src proto.Message)

func (*Pipeline) XXX_Size

func (m *Pipeline) XXX_Size() int

func (*Pipeline) XXX_Unmarshal

func (m *Pipeline) XXX_Unmarshal(b []byte) error

type PipelineWorkflow

type PipelineWorkflow struct {
	// Name is a descriptive name of the pipeline workflow.
	Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"name" yaml: "name`
	// Filters contains one or more references to a resource to use as an event
	// filter.
	Filters []*ResourceReference `protobuf:"bytes,2,rep,name=Filters,proto3" json:"filters,omitempty" yaml: "filters,omitempty"`
	// Mutator contains a reference to a resource to use as an event mutator.
	Mutator *ResourceReference `protobuf:"bytes,3,opt,name=Mutator,proto3" json:"mutator,omitempty" yaml: "mutator,omitempty"`
	// Handler contains a reference to a resource to use as an event handler.
	Handler              *ResourceReference `protobuf:"bytes,4,opt,name=Handler,proto3" json:"handler" yaml: "handler]"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

PipelineWorkflow represents a workflow of filters, mutator, & handler to use in a pipeline.

func NewPopulatedPipelineWorkflow

func NewPopulatedPipelineWorkflow(r randyPipelineWorkflow, easy bool) *PipelineWorkflow

func PipelineWorkflowFromHandler

func PipelineWorkflowFromHandler(ctx context.Context, workflowName string, handler *Handler) *PipelineWorkflow

PipelineWorkflowFromHandler takes a Handler, converts it to a PipelineWorkflow and then returns it.

func (*PipelineWorkflow) Descriptor

func (*PipelineWorkflow) Descriptor() ([]byte, []int)

func (*PipelineWorkflow) Equal

func (this *PipelineWorkflow) Equal(that interface{}) bool

func (*PipelineWorkflow) GetFilters

func (m *PipelineWorkflow) GetFilters() []*ResourceReference

func (*PipelineWorkflow) GetHandler

func (m *PipelineWorkflow) GetHandler() *ResourceReference

func (*PipelineWorkflow) GetMutator

func (m *PipelineWorkflow) GetMutator() *ResourceReference

func (*PipelineWorkflow) GetName

func (m *PipelineWorkflow) GetName() string

func (*PipelineWorkflow) Marshal

func (m *PipelineWorkflow) Marshal() (dAtA []byte, err error)

func (*PipelineWorkflow) MarshalTo

func (m *PipelineWorkflow) MarshalTo(dAtA []byte) (int, error)

func (*PipelineWorkflow) MarshalToSizedBuffer

func (m *PipelineWorkflow) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PipelineWorkflow) ProtoMessage

func (*PipelineWorkflow) ProtoMessage()

func (*PipelineWorkflow) Reset

func (m *PipelineWorkflow) Reset()

func (*PipelineWorkflow) Size

func (m *PipelineWorkflow) Size() (n int)

func (*PipelineWorkflow) String

func (m *PipelineWorkflow) String() string

func (*PipelineWorkflow) Unmarshal

func (m *PipelineWorkflow) Unmarshal(dAtA []byte) error

func (*PipelineWorkflow) Validate

func (w *PipelineWorkflow) Validate() error

validate checks if a pipeline workflow resource passes validation rules.

func (*PipelineWorkflow) XXX_DiscardUnknown

func (m *PipelineWorkflow) XXX_DiscardUnknown()

func (*PipelineWorkflow) XXX_Marshal

func (m *PipelineWorkflow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PipelineWorkflow) XXX_Merge

func (m *PipelineWorkflow) XXX_Merge(src proto.Message)

func (*PipelineWorkflow) XXX_Size

func (m *PipelineWorkflow) XXX_Size() int

func (*PipelineWorkflow) XXX_Unmarshal

func (m *PipelineWorkflow) XXX_Unmarshal(b []byte) error

type PostgresHealth

type PostgresHealth struct {
	// Name is the name of the postgres resource.
	Name string

	// Active indicates if the store is configured to use the postgres configuration.
	Active bool

	// Healthy indicates if the postgres store is connected and can query the events table.
	Healthy bool
}

PostgresHealth holds postgres store status info.

type Process

type Process struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Process contains information about a local process.

func NewPopulatedProcess

func NewPopulatedProcess(r randyEntity, easy bool) *Process

func (*Process) Descriptor

func (*Process) Descriptor() ([]byte, []int)

func (*Process) Equal

func (this *Process) Equal(that interface{}) bool

func (*Process) GetName

func (m *Process) GetName() string

func (*Process) Marshal

func (m *Process) Marshal() (dAtA []byte, err error)

func (*Process) MarshalTo

func (m *Process) MarshalTo(dAtA []byte) (int, error)

func (*Process) MarshalToSizedBuffer

func (m *Process) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Process) ProtoMessage

func (*Process) ProtoMessage()

func (*Process) Reset

func (m *Process) Reset()

func (*Process) Size

func (m *Process) Size() (n int)

func (*Process) String

func (m *Process) String() string

func (*Process) Unmarshal

func (m *Process) Unmarshal(dAtA []byte) error

func (*Process) XXX_DiscardUnknown

func (m *Process) XXX_DiscardUnknown()

func (*Process) XXX_Marshal

func (m *Process) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Process) XXX_Merge

func (m *Process) XXX_Merge(src proto.Message)

func (*Process) XXX_Size

func (m *Process) XXX_Size() int

func (*Process) XXX_Unmarshal

func (m *Process) XXX_Unmarshal(b []byte) error

type ProxyRequests

type ProxyRequests struct {
	// EntityAttributes store serialized arbitrary JSON-encoded data to match
	// entities in the registry.
	EntityAttributes []string `protobuf:"bytes,1,rep,name=entity_attributes,json=entityAttributes,proto3" json:"entity_attributes"`
	// Splay indicates if proxy check requests should be splayed, published
	// evenly over a window of time.
	Splay bool `protobuf:"varint,2,opt,name=splay,proto3" json:"splay"`
	// SplayCoverage is the percentage used for proxy check request splay
	// calculation.
	SplayCoverage        uint32   `protobuf:"varint,3,opt,name=splay_coverage,json=splayCoverage,proto3" json:"splay_coverage"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A ProxyRequests represents a request to execute a proxy check

func FixtureProxyRequests

func FixtureProxyRequests(splay bool) *ProxyRequests

FixtureProxyRequests returns a fixture for a ProxyRequests object.

func NewPopulatedProxyRequests

func NewPopulatedProxyRequests(r randyCheck, easy bool) *ProxyRequests

func (*ProxyRequests) Descriptor

func (*ProxyRequests) Descriptor() ([]byte, []int)

func (*ProxyRequests) Equal

func (this *ProxyRequests) Equal(that interface{}) bool

func (*ProxyRequests) GetEntityAttributes

func (m *ProxyRequests) GetEntityAttributes() []string

func (*ProxyRequests) GetSplay

func (m *ProxyRequests) GetSplay() bool

func (*ProxyRequests) GetSplayCoverage

func (m *ProxyRequests) GetSplayCoverage() uint32

func (*ProxyRequests) Marshal

func (m *ProxyRequests) Marshal() (dAtA []byte, err error)

func (*ProxyRequests) MarshalTo

func (m *ProxyRequests) MarshalTo(dAtA []byte) (int, error)

func (*ProxyRequests) MarshalToSizedBuffer

func (m *ProxyRequests) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ProxyRequests) ProtoMessage

func (*ProxyRequests) ProtoMessage()

func (*ProxyRequests) Reset

func (m *ProxyRequests) Reset()

func (*ProxyRequests) Size

func (m *ProxyRequests) Size() (n int)

func (*ProxyRequests) String

func (m *ProxyRequests) String() string

func (*ProxyRequests) Unmarshal

func (m *ProxyRequests) Unmarshal(dAtA []byte) error

func (*ProxyRequests) Validate

func (p *ProxyRequests) Validate() error

Validate returns an error if the ProxyRequests does not pass validation tests

func (*ProxyRequests) XXX_DiscardUnknown

func (m *ProxyRequests) XXX_DiscardUnknown()

func (*ProxyRequests) XXX_Marshal

func (m *ProxyRequests) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProxyRequests) XXX_Merge

func (m *ProxyRequests) XXX_Merge(src proto.Message)

func (*ProxyRequests) XXX_Size

func (m *ProxyRequests) XXX_Size() int

func (*ProxyRequests) XXX_Unmarshal

func (m *ProxyRequests) XXX_Unmarshal(b []byte) error

type Resource

type Resource interface {
	// GetObjectMeta returns the object metadata for the resource.
	GetObjectMeta() ObjectMeta

	// SetObjectMeta sets the object metadata for the resource.
	SetObjectMeta(ObjectMeta)

	// SetNamespace sets the namespace of the resource.
	SetNamespace(string)

	// StorePrefix gives the path prefix to this resource in the store
	StorePrefix() string

	// RBACName describes the name of the resource for RBAC purposes.
	RBACName() string

	// URIPath gives the path to the resource, e.g. /checks/checkname
	URIPath() string

	// Validate checks if the fields in the resource are valid.
	Validate() error
}

Resource represents a Sensu resource.

type ResourceReference

type ResourceReference struct {
	// Name is the name of the resource to reference.
	Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"name" yaml: "name"`
	// Type is the name of the data type of the resource to reference.
	Type string `protobuf:"bytes,2,opt,name=Type,proto3" json:"type" yaml: "type"`
	// APIVersion is the API version of the resource to reference.
	APIVersion           string   `protobuf:"bytes,3,opt,name=APIVersion,proto3" json:"api_version" yaml: "api_version"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ResourceReference represents a reference to another resource.

func FixturePipelineReference

func FixturePipelineReference(name string) *ResourceReference

FixturePipelineReference returns a testing fixture for a ResourceReference object referencing a corev2.Pipeline.

func FromStringRef

func FromStringRef(s string) (*ResourceReference, error)

func NewPopulatedResourceReference

func NewPopulatedResourceReference(r randyResourceReference, easy bool) *ResourceReference

func (*ResourceReference) Descriptor

func (*ResourceReference) Descriptor() ([]byte, []int)

func (*ResourceReference) Equal

func (this *ResourceReference) Equal(that interface{}) bool

func (*ResourceReference) GetAPIVersion

func (m *ResourceReference) GetAPIVersion() string

func (*ResourceReference) GetName

func (m *ResourceReference) GetName() string

func (*ResourceReference) GetType

func (m *ResourceReference) GetType() string

func (*ResourceReference) LogFields

func (r *ResourceReference) LogFields(debug bool) map[string]interface{}

LogFields returns a map of field names to values which represent a ResourceReference.

func (*ResourceReference) Marshal

func (m *ResourceReference) Marshal() (dAtA []byte, err error)

func (*ResourceReference) MarshalTo

func (m *ResourceReference) MarshalTo(dAtA []byte) (int, error)

func (*ResourceReference) MarshalToSizedBuffer

func (m *ResourceReference) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ResourceReference) ProtoMessage

func (*ResourceReference) ProtoMessage()

func (*ResourceReference) Reset

func (m *ResourceReference) Reset()

func (*ResourceReference) ResourceID

func (r *ResourceReference) ResourceID() string

ResourceID returns a string that uniquely identifies a ResourceReference in the format: APIVersion.Type(Name=%s)

func (*ResourceReference) Size

func (m *ResourceReference) Size() (n int)

func (*ResourceReference) String

func (m *ResourceReference) String() string

func (*ResourceReference) StringRef

func (r *ResourceReference) StringRef() string

func (*ResourceReference) Unmarshal

func (m *ResourceReference) Unmarshal(dAtA []byte) error

func (*ResourceReference) Validate

func (r *ResourceReference) Validate() error

Validate checks if a resource reference resource passes validation rules.

func (*ResourceReference) XXX_DiscardUnknown

func (m *ResourceReference) XXX_DiscardUnknown()

func (*ResourceReference) XXX_Marshal

func (m *ResourceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ResourceReference) XXX_Merge

func (m *ResourceReference) XXX_Merge(src proto.Message)

func (*ResourceReference) XXX_Size

func (m *ResourceReference) XXX_Size() int

func (*ResourceReference) XXX_Unmarshal

func (m *ResourceReference) XXX_Unmarshal(b []byte) error

type Role

type Role struct {
	Rules []Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules"`
	// Metadata contains name, namespace, labels and annotations
	ObjectMeta           `protobuf:"bytes,4,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Role applies only to a single namespace.

func FixtureRole

func FixtureRole(name, namespace string) *Role

FixtureRole returns a partial role

func NewPopulatedRole

func NewPopulatedRole(r randyRbac, easy bool) *Role

func NewRole

func NewRole(meta ObjectMeta) *Role

NewRole creates a new Role.

func NewRoleFromFace

func NewRoleFromFace(that RoleFace) *Role

func (*Role) Descriptor

func (*Role) Descriptor() ([]byte, []int)

func (*Role) Equal

func (this *Role) Equal(that interface{}) bool

func (*Role) Fields

func (c *Role) Fields() map[string]string

Fields returns a set of fields that represent that resource

func (*Role) GetMetadata

func (r *Role) GetMetadata() *ObjectMeta

func (*Role) GetObjectMeta

func (this *Role) GetObjectMeta() ObjectMeta

func (*Role) GetRules

func (this *Role) GetRules() []Rule

func (*Role) Marshal

func (m *Role) Marshal() (dAtA []byte, err error)

func (*Role) MarshalTo

func (m *Role) MarshalTo(dAtA []byte) (int, error)

func (*Role) MarshalToSizedBuffer

func (m *Role) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Role) Proto

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) RBACName

func (*Role) RBACName() string

RBACName returns the name of the resource for RBAC

func (*Role) Reset

func (m *Role) Reset()

func (*Role) SetMetadata

func (r *Role) SetMetadata(meta *ObjectMeta)

func (*Role) SetNamespace

func (r *Role) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*Role) SetObjectMeta

func (r *Role) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*Role) Size

func (m *Role) Size() (n int)

func (*Role) StoreName

func (r *Role) StoreName() string

func (*Role) StorePrefix

func (r *Role) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*Role) String

func (m *Role) String() string

func (*Role) TestProto

func (this *Role) TestProto() github_com_golang_protobuf_proto.Message

func (*Role) URIPath

func (r *Role) URIPath() string

URIPath returns the path component of a role URI.

func (*Role) Unmarshal

func (m *Role) Unmarshal(dAtA []byte) error

func (*Role) Validate

func (r *Role) Validate() error

Validate a Role

func (*Role) XXX_DiscardUnknown

func (m *Role) XXX_DiscardUnknown()

func (*Role) XXX_Marshal

func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Role) XXX_Merge

func (m *Role) XXX_Merge(src proto.Message)

func (*Role) XXX_Size

func (m *Role) XXX_Size() int

func (*Role) XXX_Unmarshal

func (m *Role) XXX_Unmarshal(b []byte) error

type RoleBinding

type RoleBinding struct {
	// Subjects holds references to the objects the Role applies to
	Subjects []Subject `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects"`
	// RoleRef references a Role in the current namespace
	RoleRef RoleRef `protobuf:"bytes,2,opt,name=role_ref,json=roleRef,proto3" json:"role_ref"`
	// Metadata contains name, namespace, labels and annotations
	ObjectMeta           `protobuf:"bytes,5,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

RoleBinding grants the permissions defined in a Role referenced to a user or a set of users

func FixtureRoleBinding

func FixtureRoleBinding(name, namespace string) *RoleBinding

FixtureRoleBinding creates a RoleBinding for testing

func NewPopulatedRoleBinding

func NewPopulatedRoleBinding(r randyRbac, easy bool) *RoleBinding

func NewRoleBinding

func NewRoleBinding(meta ObjectMeta) *RoleBinding

NewRoleBinding creates a new RoleBinding.

func NewRoleBindingFromFace

func NewRoleBindingFromFace(that RoleBindingFace) *RoleBinding

func (*RoleBinding) Descriptor

func (*RoleBinding) Descriptor() ([]byte, []int)

func (*RoleBinding) Equal

func (this *RoleBinding) Equal(that interface{}) bool

func (*RoleBinding) Fields

func (c *RoleBinding) Fields() map[string]string

Fields returns a set of fields that represent that resource

func (*RoleBinding) GetMetadata

func (r *RoleBinding) GetMetadata() *ObjectMeta

func (*RoleBinding) GetObjectMeta

func (this *RoleBinding) GetObjectMeta() ObjectMeta

func (*RoleBinding) GetRoleRef

func (this *RoleBinding) GetRoleRef() RoleRef

func (*RoleBinding) GetSubjects

func (this *RoleBinding) GetSubjects() []Subject

func (*RoleBinding) Marshal

func (m *RoleBinding) Marshal() (dAtA []byte, err error)

func (*RoleBinding) MarshalTo

func (m *RoleBinding) MarshalTo(dAtA []byte) (int, error)

func (*RoleBinding) MarshalToSizedBuffer

func (m *RoleBinding) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RoleBinding) Proto

func (*RoleBinding) ProtoMessage

func (*RoleBinding) ProtoMessage()

func (*RoleBinding) RBACName

func (*RoleBinding) RBACName() string

RBACName returns the name of the resource for RBAC

func (*RoleBinding) Reset

func (m *RoleBinding) Reset()

func (*RoleBinding) SetMetadata

func (r *RoleBinding) SetMetadata(meta *ObjectMeta)

func (*RoleBinding) SetNamespace

func (b *RoleBinding) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*RoleBinding) SetObjectMeta

func (b *RoleBinding) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*RoleBinding) Size

func (m *RoleBinding) Size() (n int)

func (*RoleBinding) StoreName

func (r *RoleBinding) StoreName() string

func (*RoleBinding) StorePrefix

func (b *RoleBinding) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*RoleBinding) String

func (m *RoleBinding) String() string

func (*RoleBinding) TestProto

func (*RoleBinding) URIPath

func (b *RoleBinding) URIPath() string

URIPath returns the path component of a role binding URI.

func (*RoleBinding) Unmarshal

func (m *RoleBinding) Unmarshal(dAtA []byte) error

func (*RoleBinding) Validate

func (b *RoleBinding) Validate() error

Validate a RoleBinding

func (*RoleBinding) XXX_DiscardUnknown

func (m *RoleBinding) XXX_DiscardUnknown()

func (*RoleBinding) XXX_Marshal

func (m *RoleBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RoleBinding) XXX_Merge

func (m *RoleBinding) XXX_Merge(src proto.Message)

func (*RoleBinding) XXX_Size

func (m *RoleBinding) XXX_Size() int

func (*RoleBinding) XXX_Unmarshal

func (m *RoleBinding) XXX_Unmarshal(b []byte) error

type RoleBindingFace

type RoleBindingFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetSubjects() []Subject
	GetRoleRef() RoleRef
	GetObjectMeta() ObjectMeta
}

type RoleFace

type RoleFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetRules() []Rule
	GetObjectMeta() ObjectMeta
}

type RoleRef

type RoleRef struct {
	// Type of role being referenced.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type"`
	// Name of the resource being referenced
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

RoleRef maps groups to Roles or ClusterRoles.

func FixtureRoleRef

func FixtureRoleRef(roleType, name string) RoleRef

FixtureRoleRef creates a RoleRef for testing

func NewPopulatedRoleRef

func NewPopulatedRoleRef(r randyRbac, easy bool) *RoleRef

func (*RoleRef) Descriptor

func (*RoleRef) Descriptor() ([]byte, []int)

func (*RoleRef) Equal

func (this *RoleRef) Equal(that interface{}) bool

func (*RoleRef) GetName

func (m *RoleRef) GetName() string

func (*RoleRef) GetType

func (m *RoleRef) GetType() string

func (*RoleRef) Marshal

func (m *RoleRef) Marshal() (dAtA []byte, err error)

func (*RoleRef) MarshalTo

func (m *RoleRef) MarshalTo(dAtA []byte) (int, error)

func (*RoleRef) MarshalToSizedBuffer

func (m *RoleRef) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RoleRef) ProtoMessage

func (*RoleRef) ProtoMessage()

func (*RoleRef) Reset

func (m *RoleRef) Reset()

func (*RoleRef) Size

func (m *RoleRef) Size() (n int)

func (*RoleRef) String

func (m *RoleRef) String() string

func (*RoleRef) Unmarshal

func (m *RoleRef) Unmarshal(dAtA []byte) error

func (*RoleRef) XXX_DiscardUnknown

func (m *RoleRef) XXX_DiscardUnknown()

func (*RoleRef) XXX_Marshal

func (m *RoleRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RoleRef) XXX_Merge

func (m *RoleRef) XXX_Merge(src proto.Message)

func (*RoleRef) XXX_Size

func (m *RoleRef) XXX_Size() int

func (*RoleRef) XXX_Unmarshal

func (m *RoleRef) XXX_Unmarshal(b []byte) error

type Rule

type Rule struct {
	// Verbs is a list of verbs that apply to all of the listed resources for
	// this rule. These include "get", "list", "watch", "create", "update",
	// "delete".
	// TODO: add support for "patch" (this is expensive and should be delayed
	// until a further release). TODO: add support for "watch" (via websockets)
	Verbs []string `protobuf:"bytes,1,rep,name=verbs,proto3" json:"verbs"`
	// Resources is a list of resources that this rule applies to. "*"
	// represents all resources.
	Resources []string `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources"`
	// ResourceNames is an optional list of resource names that the rule applies
	// to.
	ResourceNames        []string `protobuf:"bytes,3,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Rule holds information that describes an action that can be taken

func FixtureRule

func FixtureRule() Rule

FixtureRule returns a partial rule

func NewPopulatedRule

func NewPopulatedRule(r randyRbac, easy bool) *Rule

func (*Rule) Descriptor

func (*Rule) Descriptor() ([]byte, []int)

func (*Rule) Equal

func (this *Rule) Equal(that interface{}) bool

func (*Rule) GetResourceNames

func (m *Rule) GetResourceNames() []string

func (*Rule) GetResources

func (m *Rule) GetResources() []string

func (*Rule) GetVerbs

func (m *Rule) GetVerbs() []string

func (*Rule) Marshal

func (m *Rule) Marshal() (dAtA []byte, err error)

func (*Rule) MarshalTo

func (m *Rule) MarshalTo(dAtA []byte) (int, error)

func (*Rule) MarshalToSizedBuffer

func (m *Rule) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Rule) ProtoMessage

func (*Rule) ProtoMessage()

func (*Rule) Reset

func (m *Rule) Reset()

func (Rule) ResourceMatches

func (r Rule) ResourceMatches(requestedResource string) bool

ResourceMatches returns whether the specified requestedResource matches any of the rule resources

func (Rule) ResourceNameMatches

func (r Rule) ResourceNameMatches(requestedResourceName string) bool

ResourceNameMatches returns whether the specified requestedResourceName matches any of the rule resources

func (*Rule) Size

func (m *Rule) Size() (n int)

func (*Rule) String

func (m *Rule) String() string

func (*Rule) Unmarshal

func (m *Rule) Unmarshal(dAtA []byte) error

func (Rule) VerbMatches

func (r Rule) VerbMatches(requestedVerb string) bool

VerbMatches returns whether the specified requestedVerb matches any of the rule verbs

func (*Rule) XXX_DiscardUnknown

func (m *Rule) XXX_DiscardUnknown()

func (*Rule) XXX_Marshal

func (m *Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Rule) XXX_Merge

func (m *Rule) XXX_Merge(src proto.Message)

func (*Rule) XXX_Size

func (m *Rule) XXX_Size() int

func (*Rule) XXX_Unmarshal

func (m *Rule) XXX_Unmarshal(b []byte) error

type Secret

type Secret struct {
	// Name is the name of the secret referenced in an executable command.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Secret is the name of the Sensu secret resource.
	Secret               string   `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A Secret is a secret specification.

func NewPopulatedSecret

func NewPopulatedSecret(r randySecret, easy bool) *Secret

func NewSecretFromFace

func NewSecretFromFace(that SecretFace) *Secret

func (*Secret) Descriptor

func (*Secret) Descriptor() ([]byte, []int)

func (*Secret) Equal

func (this *Secret) Equal(that interface{}) bool

func (*Secret) GetName

func (this *Secret) GetName() string

func (*Secret) GetSecret

func (this *Secret) GetSecret() string

func (*Secret) Marshal

func (m *Secret) Marshal() (dAtA []byte, err error)

func (*Secret) MarshalTo

func (m *Secret) MarshalTo(dAtA []byte) (int, error)

func (*Secret) MarshalToSizedBuffer

func (m *Secret) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Secret) Proto

func (*Secret) ProtoMessage

func (*Secret) ProtoMessage()

func (*Secret) Reset

func (m *Secret) Reset()

func (*Secret) Size

func (m *Secret) Size() (n int)

func (*Secret) String

func (m *Secret) String() string

func (*Secret) TestProto

func (*Secret) Unmarshal

func (m *Secret) Unmarshal(dAtA []byte) error

func (*Secret) XXX_DiscardUnknown

func (m *Secret) XXX_DiscardUnknown()

func (*Secret) XXX_Marshal

func (m *Secret) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Secret) XXX_Merge

func (m *Secret) XXX_Merge(src proto.Message)

func (*Secret) XXX_Size

func (m *Secret) XXX_Size() int

func (*Secret) XXX_Unmarshal

func (m *Secret) XXX_Unmarshal(b []byte) error

type SecretFace

type SecretFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetName() string
	GetSecret() string
}

type Silenced

type Silenced struct {
	// Metadata contains the name, namespace, labels and annotations of the
	// silenced
	ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"`
	// Expire is the number of seconds the entry will live
	Expire int64 `protobuf:"varint,2,opt,name=expire,proto3" json:"expire"`
	// ExpireOnResolve defaults to false, clears the entry on resolution when
	// set to true
	ExpireOnResolve bool `protobuf:"varint,3,opt,name=expire_on_resolve,json=expireOnResolve,proto3" json:"expire_on_resolve"`
	// Creator is the author of the silenced entry
	Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"`
	// Check is the name of the check event to be silenced.
	Check string `protobuf:"bytes,5,opt,name=check,proto3" json:"check,omitempty"`
	// Reason is used to provide context to the entry
	Reason string `protobuf:"bytes,6,opt,name=reason,proto3" json:"reason,omitempty"`
	// Subscription is the name of the subscription to which the entry applies.
	Subscription string `protobuf:"bytes,7,opt,name=subscription,proto3" json:"subscription,omitempty"`
	// Begin is a timestamp at which the silenced entry takes effect.
	Begin int64 `protobuf:"varint,10,opt,name=begin,proto3" json:"begin"`
	// ExpireAt is a timestamp at which the silenced entry will expire.
	ExpireAt             int64    `protobuf:"varint,11,opt,name=expire_at,json=expireAt,proto3" json:"expire_at"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Silenced is the representation of a silence entry.

func FixtureSilenced

func FixtureSilenced(name string) *Silenced

FixtureSilenced returns a testing fixture for a Silenced event struct.

func NewPopulatedSilenced

func NewPopulatedSilenced(r randySilenced, easy bool) *Silenced

func NewSilenced

func NewSilenced(meta ObjectMeta) *Silenced

NewSilenced creates a new Silenced entry.

func NewSilencedFromFace

func NewSilencedFromFace(that SilencedFace) *Silenced

func (*Silenced) Descriptor

func (*Silenced) Descriptor() ([]byte, []int)

func (*Silenced) Equal

func (this *Silenced) Equal(that interface{}) bool

func (*Silenced) Fields

func (s *Silenced) Fields() map[string]string

Fields returns a set of fields that represent that resource

func (*Silenced) GetBegin

func (this *Silenced) GetBegin() int64

func (*Silenced) GetCheck

func (this *Silenced) GetCheck() string

func (*Silenced) GetCreator

func (this *Silenced) GetCreator() string

func (*Silenced) GetExpire

func (this *Silenced) GetExpire() int64

func (*Silenced) GetExpireAt

func (this *Silenced) GetExpireAt() int64

func (*Silenced) GetExpireOnResolve

func (this *Silenced) GetExpireOnResolve() bool

func (*Silenced) GetMetadata

func (s *Silenced) GetMetadata() *ObjectMeta

func (*Silenced) GetObjectMeta

func (this *Silenced) GetObjectMeta() ObjectMeta

func (*Silenced) GetReason

func (this *Silenced) GetReason() string

func (*Silenced) GetSubscription

func (this *Silenced) GetSubscription() string

func (*Silenced) Marshal

func (m *Silenced) Marshal() (dAtA []byte, err error)

func (*Silenced) MarshalTo

func (m *Silenced) MarshalTo(dAtA []byte) (int, error)

func (*Silenced) MarshalToSizedBuffer

func (m *Silenced) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Silenced) Matches

func (s *Silenced) Matches(check, subscription string) bool

Matches returns true if the given check name and subscription match the silence.

The two properties compared, Subscription and Check, are only compared if they are not empty. An empty value for either of those fields is considered a wildcard, ie: s.Check = "foo" && s.Subscription = "" will return true for s.Matches("foo", <anything>).

func (*Silenced) Prepare

func (s *Silenced) Prepare(ctx context.Context)

Prepare prepares a silenced entry for storage

func (*Silenced) Proto

func (*Silenced) ProtoMessage

func (*Silenced) ProtoMessage()

func (*Silenced) RBACName

func (*Silenced) RBACName() string

func (*Silenced) Reset

func (m *Silenced) Reset()

func (*Silenced) SetMetadata

func (s *Silenced) SetMetadata(meta *ObjectMeta)

func (*Silenced) SetNamespace

func (s *Silenced) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*Silenced) SetObjectMeta

func (s *Silenced) SetObjectMeta(meta ObjectMeta)

SetObjectMeta sets the meta of the resource.

func (*Silenced) Size

func (m *Silenced) Size() (n int)

func (*Silenced) StartSilence deprecated

func (s *Silenced) StartSilence(t int64) bool

StartSilence returns true if the given unix timestamp is equal to or occurs after the Silence's start time.

Deprecated: To be removed in a future release, please simply use the Begin field.

func (*Silenced) StoreName

func (s *Silenced) StoreName() string

func (*Silenced) StorePrefix

func (s *Silenced) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*Silenced) String

func (m *Silenced) String() string

func (*Silenced) TestProto

func (*Silenced) URIPath

func (s *Silenced) URIPath() string

URIPath returns the path component of a silenced entry URI.

func (*Silenced) Unmarshal

func (m *Silenced) Unmarshal(dAtA []byte) error

func (*Silenced) Validate

func (s *Silenced) Validate() error

Validate returns an error if the CheckName and Subscription fields are not provided.

func (*Silenced) XXX_DiscardUnknown

func (m *Silenced) XXX_DiscardUnknown()

func (*Silenced) XXX_Marshal

func (m *Silenced) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Silenced) XXX_Merge

func (m *Silenced) XXX_Merge(src proto.Message)

func (*Silenced) XXX_Size

func (m *Silenced) XXX_Size() int

func (*Silenced) XXX_Unmarshal

func (m *Silenced) XXX_Unmarshal(b []byte) error

type SilencedFace

type SilencedFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetObjectMeta() ObjectMeta
	GetExpire() int64
	GetExpireOnResolve() bool
	GetCreator() string
	GetCheck() string
	GetReason() string
	GetSubscription() string
	GetBegin() int64
	GetExpireAt() int64
}

type Subject

type Subject struct {
	// Type of object referenced (user or group)
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type"`
	// Name of the referenced object
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func FixtureSubject

func FixtureSubject(subjectType, name string) Subject

FixtureSubject creates a Subject for testing

func NewPopulatedSubject

func NewPopulatedSubject(r randyRbac, easy bool) *Subject

func ValidateSubjects

func ValidateSubjects(subjects []Subject) ([]Subject, error)

ValidateSubjects checks that there is at least one subject, and all subjects have non-empty types and names.

func (*Subject) Descriptor

func (*Subject) Descriptor() ([]byte, []int)

func (*Subject) Equal

func (this *Subject) Equal(that interface{}) bool

func (*Subject) GetName

func (m *Subject) GetName() string

func (*Subject) GetType

func (m *Subject) GetType() string

func (*Subject) Marshal

func (m *Subject) Marshal() (dAtA []byte, err error)

func (*Subject) MarshalTo

func (m *Subject) MarshalTo(dAtA []byte) (int, error)

func (*Subject) MarshalToSizedBuffer

func (m *Subject) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Subject) ProtoMessage

func (*Subject) ProtoMessage()

func (*Subject) Reset

func (m *Subject) Reset()

func (*Subject) Size

func (m *Subject) Size() (n int)

func (*Subject) String

func (m *Subject) String() string

func (*Subject) Unmarshal

func (m *Subject) Unmarshal(dAtA []byte) error

func (*Subject) XXX_DiscardUnknown

func (m *Subject) XXX_DiscardUnknown()

func (*Subject) XXX_Marshal

func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Subject) XXX_Merge

func (m *Subject) XXX_Merge(src proto.Message)

func (*Subject) XXX_Size

func (m *Subject) XXX_Size() int

func (*Subject) XXX_Unmarshal

func (m *Subject) XXX_Unmarshal(b []byte) error

type System

type System struct {
	Hostname        string  `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
	OS              string  `protobuf:"bytes,2,opt,name=os,proto3" json:"os,omitempty"`
	Platform        string  `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"`
	PlatformFamily  string  `protobuf:"bytes,4,opt,name=platform_family,json=platformFamily,proto3" json:"platform_family,omitempty"`
	PlatformVersion string  `protobuf:"bytes,5,opt,name=platform_version,json=platformVersion,proto3" json:"platform_version,omitempty"`
	Network         Network `protobuf:"bytes,6,opt,name=network,proto3" json:"network"`
	Arch            string  `protobuf:"bytes,7,opt,name=arch,proto3" json:"arch,omitempty"`
	ARMVersion      int32   `protobuf:"varint,8,opt,name=arm_version,json=armVersion,proto3" json:"arm_version,omitempty"`
	// LibCType indicates the type of libc the agent has access to (glibc, musl,
	// etc)
	LibCType string `protobuf:"bytes,9,opt,name=LibCType,proto3" json:"libc_type"`
	// VMSystem indicates the VM system of the agent (kvm, vbox, etc)
	VMSystem string `protobuf:"bytes,10,opt,name=VMSystem,proto3" json:"vm_system"`
	// VMRole indicates the VM role of the agent (host/guest)
	VMRole string `protobuf:"bytes,11,opt,name=VMRole,proto3" json:"vm_role"`
	// CloudProvider indicates the public cloud the agent is running on.
	CloudProvider string `protobuf:"bytes,12,opt,name=CloudProvider,proto3" json:"cloud_provider"`
	FloatType     string `protobuf:"bytes,13,opt,name=float_type,json=floatType,proto3" json:"float_type,omitempty"`
	// Processes contains information about the local processes on the agent.
	Processes            []*Process `protobuf:"bytes,14,rep,name=Processes,proto3" json:"processes"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

System contains information about the system that the Agent process is running on, used for additional Entity context.

func NewPopulatedSystem

func NewPopulatedSystem(r randyEntity, easy bool) *System

func (*System) Descriptor

func (*System) Descriptor() ([]byte, []int)

func (*System) Equal

func (this *System) Equal(that interface{}) bool

func (*System) GetARMVersion

func (m *System) GetARMVersion() int32

func (*System) GetArch

func (m *System) GetArch() string

func (*System) GetCloudProvider

func (m *System) GetCloudProvider() string

func (*System) GetFloatType

func (m *System) GetFloatType() string

func (*System) GetHostname

func (m *System) GetHostname() string

func (*System) GetLibCType

func (m *System) GetLibCType() string

func (*System) GetNetwork

func (m *System) GetNetwork() Network

func (*System) GetOS

func (m *System) GetOS() string

func (*System) GetPlatform

func (m *System) GetPlatform() string

func (*System) GetPlatformFamily

func (m *System) GetPlatformFamily() string

func (*System) GetPlatformVersion

func (m *System) GetPlatformVersion() string

func (*System) GetProcesses

func (m *System) GetProcesses() []*Process

func (*System) GetVMRole

func (m *System) GetVMRole() string

func (*System) GetVMSystem

func (m *System) GetVMSystem() string

func (*System) Marshal

func (m *System) Marshal() (dAtA []byte, err error)

func (*System) MarshalTo

func (m *System) MarshalTo(dAtA []byte) (int, error)

func (*System) MarshalToSizedBuffer

func (m *System) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*System) ProtoMessage

func (*System) ProtoMessage()

func (*System) Reset

func (m *System) Reset()

func (*System) Size

func (m *System) Size() (n int)

func (*System) String

func (m *System) String() string

func (*System) Unmarshal

func (m *System) Unmarshal(dAtA []byte) error

func (*System) XXX_DiscardUnknown

func (m *System) XXX_DiscardUnknown()

func (*System) XXX_Marshal

func (m *System) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*System) XXX_Merge

func (m *System) XXX_Merge(src proto.Message)

func (*System) XXX_Size

func (m *System) XXX_Size() int

func (*System) XXX_Unmarshal

func (m *System) XXX_Unmarshal(b []byte) error

type TLSOptions

type TLSOptions struct {
	CertFile             string   `protobuf:"bytes,1,opt,name=cert_file,json=certFile,proto3" json:"cert_file,omitempty"`
	KeyFile              string   `protobuf:"bytes,2,opt,name=key_file,json=keyFile,proto3" json:"key_file,omitempty"`
	TrustedCAFile        string   `protobuf:"bytes,3,opt,name=trusted_ca_file,json=trustedCaFile,proto3" json:"trusted_ca_file,omitempty"`
	InsecureSkipVerify   bool     `protobuf:"varint,4,opt,name=insecure_skip_verify,json=insecureSkipVerify,proto3" json:"insecure_skip_verify"`
	ClientAuthType       bool     `protobuf:"varint,5,opt,name=client_auth_type,json=clientAuthType,proto3" json:"client_auth_type,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TLSOptions holds TLS options that are used across the varying Sensu components

func NewPopulatedTLSOptions

func NewPopulatedTLSOptions(r randyTls, easy bool) *TLSOptions

func (*TLSOptions) Descriptor

func (*TLSOptions) Descriptor() ([]byte, []int)

func (*TLSOptions) Equal

func (this *TLSOptions) Equal(that interface{}) bool

func (*TLSOptions) GetCertFile

func (m *TLSOptions) GetCertFile() string

func (*TLSOptions) GetClientAuthType

func (m *TLSOptions) GetClientAuthType() bool

func (*TLSOptions) GetInsecureSkipVerify

func (m *TLSOptions) GetInsecureSkipVerify() bool

func (*TLSOptions) GetKeyFile

func (m *TLSOptions) GetKeyFile() string

func (*TLSOptions) GetTrustedCAFile

func (m *TLSOptions) GetTrustedCAFile() string

func (*TLSOptions) Marshal

func (m *TLSOptions) Marshal() (dAtA []byte, err error)

func (*TLSOptions) MarshalTo

func (m *TLSOptions) MarshalTo(dAtA []byte) (int, error)

func (*TLSOptions) MarshalToSizedBuffer

func (m *TLSOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TLSOptions) ProtoMessage

func (*TLSOptions) ProtoMessage()

func (*TLSOptions) Reset

func (m *TLSOptions) Reset()

func (*TLSOptions) Size

func (m *TLSOptions) Size() (n int)

func (*TLSOptions) String

func (m *TLSOptions) String() string

func (*TLSOptions) ToClientTLSConfig

func (t *TLSOptions) ToClientTLSConfig() (*tls.Config, error)

ToClientTLSConfig is like ToServerTLSConfig but intended for TLS client config.

func (*TLSOptions) ToServerTLSConfig

func (t *TLSOptions) ToServerTLSConfig() (*tls.Config, error)

ToServerTLSConfig should only be used for server TLS configuration. outputs a tls.Config from TLSOptions

func (*TLSOptions) Unmarshal

func (m *TLSOptions) Unmarshal(dAtA []byte) error

func (*TLSOptions) XXX_DiscardUnknown

func (m *TLSOptions) XXX_DiscardUnknown()

func (*TLSOptions) XXX_Marshal

func (m *TLSOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TLSOptions) XXX_Merge

func (m *TLSOptions) XXX_Merge(src proto.Message)

func (*TLSOptions) XXX_Size

func (m *TLSOptions) XXX_Size() int

func (*TLSOptions) XXX_Unmarshal

func (m *TLSOptions) XXX_Unmarshal(b []byte) error

type TessenConfig

type TessenConfig struct {
	// OptOut is the opt-out status of the tessen configuration
	OptOut               bool     `protobuf:"varint,1,opt,name=opt_out,json=optOut,proto3" json:"opt_out"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TessenConfig is the representation of a tessen configuration.

func DefaultTessenConfig

func DefaultTessenConfig() *TessenConfig

DefaultTessenConfig returns the default tessen configuration

func NewPopulatedTessenConfig

func NewPopulatedTessenConfig(r randyTessen, easy bool) *TessenConfig

func NewTessenConfigFromFace

func NewTessenConfigFromFace(that TessenConfigFace) *TessenConfig

func (*TessenConfig) Descriptor

func (*TessenConfig) Descriptor() ([]byte, []int)

func (*TessenConfig) Equal

func (this *TessenConfig) Equal(that interface{}) bool

func (*TessenConfig) GetMetadata

func (t *TessenConfig) GetMetadata() *ObjectMeta

func (*TessenConfig) GetObjectMeta

func (t *TessenConfig) GetObjectMeta() ObjectMeta

GetObjectMeta only exists here to fulfil the requirements of Resource

func (*TessenConfig) GetOptOut

func (this *TessenConfig) GetOptOut() bool

func (*TessenConfig) Marshal

func (m *TessenConfig) Marshal() (dAtA []byte, err error)

func (*TessenConfig) MarshalTo

func (m *TessenConfig) MarshalTo(dAtA []byte) (int, error)

func (*TessenConfig) MarshalToSizedBuffer

func (m *TessenConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TessenConfig) Proto

func (*TessenConfig) ProtoMessage

func (*TessenConfig) ProtoMessage()

func (*TessenConfig) RBACName

func (*TessenConfig) RBACName() string

func (*TessenConfig) Reset

func (m *TessenConfig) Reset()

func (*TessenConfig) SetMetadata

func (t *TessenConfig) SetMetadata(meta *ObjectMeta)

func (*TessenConfig) SetNamespace

func (t *TessenConfig) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*TessenConfig) SetObjectMeta

func (t *TessenConfig) SetObjectMeta(ObjectMeta)

SetObjectMeta only exists here to fulfil the requirements of Resource

func (*TessenConfig) Size

func (m *TessenConfig) Size() (n int)

func (*TessenConfig) StoreName

func (t *TessenConfig) StoreName() string

func (*TessenConfig) StorePrefix

func (t *TessenConfig) StorePrefix() string

StorePrefix returns the path prefix to the Tessen config in the store

func (*TessenConfig) String

func (m *TessenConfig) String() string

func (*TessenConfig) TestProto

func (*TessenConfig) URIPath

func (t *TessenConfig) URIPath() string

URIPath returns the path component of the Tessen config URI.

func (*TessenConfig) Unmarshal

func (m *TessenConfig) Unmarshal(dAtA []byte) error

func (*TessenConfig) Validate

func (t *TessenConfig) Validate() error

Validate validates the TessenConfig.

func (*TessenConfig) XXX_DiscardUnknown

func (m *TessenConfig) XXX_DiscardUnknown()

func (*TessenConfig) XXX_Marshal

func (m *TessenConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TessenConfig) XXX_Merge

func (m *TessenConfig) XXX_Merge(src proto.Message)

func (*TessenConfig) XXX_Size

func (m *TessenConfig) XXX_Size() int

func (*TessenConfig) XXX_Unmarshal

func (m *TessenConfig) XXX_Unmarshal(b []byte) error

type TessenConfigFace

type TessenConfigFace interface {
	Proto() github_com_golang_protobuf_proto.Message
	GetOptOut() bool
}

type TimeWindowDays

type TimeWindowDays struct {
	All                  []*TimeWindowTimeRange `protobuf:"bytes,1,rep,name=all,proto3" json:"all,omitempty"`
	Sunday               []*TimeWindowTimeRange `protobuf:"bytes,2,rep,name=sunday,proto3" json:"sunday,omitempty"`
	Monday               []*TimeWindowTimeRange `protobuf:"bytes,3,rep,name=monday,proto3" json:"monday,omitempty"`
	Tuesday              []*TimeWindowTimeRange `protobuf:"bytes,4,rep,name=tuesday,proto3" json:"tuesday,omitempty"`
	Wednesday            []*TimeWindowTimeRange `protobuf:"bytes,5,rep,name=wednesday,proto3" json:"wednesday,omitempty"`
	Thursday             []*TimeWindowTimeRange `protobuf:"bytes,6,rep,name=thursday,proto3" json:"thursday,omitempty"`
	Friday               []*TimeWindowTimeRange `protobuf:"bytes,7,rep,name=friday,proto3" json:"friday,omitempty"`
	Saturday             []*TimeWindowTimeRange `protobuf:"bytes,8,rep,name=saturday,proto3" json:"saturday,omitempty"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

TimeWindowDays defines the days of a time window

func NewPopulatedTimeWindowDays

func NewPopulatedTimeWindowDays(r randyTimeWindow, easy bool) *TimeWindowDays

func (*TimeWindowDays) Descriptor

func (*TimeWindowDays) Descriptor() ([]byte, []int)

func (*TimeWindowDays) Equal

func (this *TimeWindowDays) Equal(that interface{}) bool

func (*TimeWindowDays) GetAll

func (m *TimeWindowDays) GetAll() []*TimeWindowTimeRange

func (*TimeWindowDays) GetFriday

func (m *TimeWindowDays) GetFriday() []*TimeWindowTimeRange

func (*TimeWindowDays) GetMonday

func (m *TimeWindowDays) GetMonday() []*TimeWindowTimeRange

func (*TimeWindowDays) GetSaturday

func (m *TimeWindowDays) GetSaturday() []*TimeWindowTimeRange

func (*TimeWindowDays) GetSunday

func (m *TimeWindowDays) GetSunday() []*TimeWindowTimeRange

func (*TimeWindowDays) GetThursday

func (m *TimeWindowDays) GetThursday() []*TimeWindowTimeRange

func (*TimeWindowDays) GetTuesday

func (m *TimeWindowDays) GetTuesday() []*TimeWindowTimeRange

func (*TimeWindowDays) GetWednesday

func (m *TimeWindowDays) GetWednesday() []*TimeWindowTimeRange

func (*TimeWindowDays) Marshal

func (m *TimeWindowDays) Marshal() (dAtA []byte, err error)

func (*TimeWindowDays) MarshalTo

func (m *TimeWindowDays) MarshalTo(dAtA []byte) (int, error)

func (*TimeWindowDays) MarshalToSizedBuffer

func (m *TimeWindowDays) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TimeWindowDays) ProtoMessage

func (*TimeWindowDays) ProtoMessage()

func (*TimeWindowDays) Reset

func (m *TimeWindowDays) Reset()

func (*TimeWindowDays) Size

func (m *TimeWindowDays) Size() (n int)

func (*TimeWindowDays) String

func (m *TimeWindowDays) String() string

func (*TimeWindowDays) Unmarshal

func (m *TimeWindowDays) Unmarshal(dAtA []byte) error

func (*TimeWindowDays) XXX_DiscardUnknown

func (m *TimeWindowDays) XXX_DiscardUnknown()

func (*TimeWindowDays) XXX_Marshal

func (m *TimeWindowDays) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimeWindowDays) XXX_Merge

func (m *TimeWindowDays) XXX_Merge(src proto.Message)

func (*TimeWindowDays) XXX_Size

func (m *TimeWindowDays) XXX_Size() int

func (*TimeWindowDays) XXX_Unmarshal

func (m *TimeWindowDays) XXX_Unmarshal(b []byte) error

type TimeWindowRepeated

type TimeWindowRepeated struct {
	// Begin is the time which the date/time window should begin, in the ISO3339
	// format
	Begin string `protobuf:"bytes,1,opt,name=begin,proto3" json:"begin"`
	// End is the time which the date/time window should begin, in the ISO3339
	// format
	End string `protobuf:"bytes,2,opt,name=end,proto3" json:"end"`
	// The time period the begin and end time repeat
	Repeat               []string `protobuf:"bytes,3,rep,name=repeat,proto3" json:"repeat"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewPopulatedTimeWindowRepeated

func NewPopulatedTimeWindowRepeated(r randyTimeWindow, easy bool) *TimeWindowRepeated

func (*TimeWindowRepeated) Descriptor

func (*TimeWindowRepeated) Descriptor() ([]byte, []int)

func (*TimeWindowRepeated) Equal

func (this *TimeWindowRepeated) Equal(that interface{}) bool

func (*TimeWindowRepeated) GetBegin

func (m *TimeWindowRepeated) GetBegin() string

func (*TimeWindowRepeated) GetBeginTime

func (t *TimeWindowRepeated) GetBeginTime() (time.Time, error)

func (*TimeWindowRepeated) GetEnd

func (m *TimeWindowRepeated) GetEnd() string

func (*TimeWindowRepeated) GetEndTime

func (t *TimeWindowRepeated) GetEndTime() (time.Time, error)

func (*TimeWindowRepeated) GetRepeat

func (m *TimeWindowRepeated) GetRepeat() []string

func (*TimeWindowRepeated) InWindows

func (t *TimeWindowRepeated) InWindows(currentTime time.Time) bool

func (*TimeWindowRepeated) Marshal

func (m *TimeWindowRepeated) Marshal() (dAtA []byte, err error)

func (*TimeWindowRepeated) MarshalTo

func (m *TimeWindowRepeated) MarshalTo(dAtA []byte) (int, error)

func (*TimeWindowRepeated) MarshalToSizedBuffer

func (m *TimeWindowRepeated) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TimeWindowRepeated) ProtoMessage

func (*TimeWindowRepeated) ProtoMessage()

func (*TimeWindowRepeated) Reset

func (m *TimeWindowRepeated) Reset()

func (*TimeWindowRepeated) Size

func (m *TimeWindowRepeated) Size() (n int)

func (*TimeWindowRepeated) String

func (m *TimeWindowRepeated) String() string

func (*TimeWindowRepeated) Unmarshal

func (m *TimeWindowRepeated) Unmarshal(dAtA []byte) error

func (*TimeWindowRepeated) Validate

func (t *TimeWindowRepeated) Validate() error

func (*TimeWindowRepeated) XXX_DiscardUnknown

func (m *TimeWindowRepeated) XXX_DiscardUnknown()

func (*TimeWindowRepeated) XXX_Marshal

func (m *TimeWindowRepeated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimeWindowRepeated) XXX_Merge

func (m *TimeWindowRepeated) XXX_Merge(src proto.Message)

func (*TimeWindowRepeated) XXX_Size

func (m *TimeWindowRepeated) XXX_Size() int

func (*TimeWindowRepeated) XXX_Unmarshal

func (m *TimeWindowRepeated) XXX_Unmarshal(b []byte) error

type TimeWindowTimeRange

type TimeWindowTimeRange struct {
	// Begin is the time which the time window should begin, in the format
	// '3:00PM', which satisfies the time.Kitchen format
	Begin string `protobuf:"bytes,1,opt,name=begin,proto3" json:"begin"`
	// End is the time which the filter should end, in the format '3:00PM', which
	// satisfies the time.Kitchen format
	End                  string   `protobuf:"bytes,2,opt,name=end,proto3" json:"end"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TimeWindowTimeRange defines the time ranges of a time

func NewPopulatedTimeWindowTimeRange

func NewPopulatedTimeWindowTimeRange(r randyTimeWindow, easy bool) *TimeWindowTimeRange

func (*TimeWindowTimeRange) Descriptor

func (*TimeWindowTimeRange) Descriptor() ([]byte, []int)

func (*TimeWindowTimeRange) Equal

func (this *TimeWindowTimeRange) Equal(that interface{}) bool

func (*TimeWindowTimeRange) GetBegin

func (m *TimeWindowTimeRange) GetBegin() string

func (*TimeWindowTimeRange) GetEnd

func (m *TimeWindowTimeRange) GetEnd() string

func (*TimeWindowTimeRange) InWindow

func (t *TimeWindowTimeRange) InWindow(current time.Time) (bool, error)

InWindow determines if the current time falls between the provided time window. Current should typically be time.Now() but to allow easier tests, it must be provided as a parameter. Begin and end parameters must be strings representing an hour of the day in the time.Kitchen format (e.g. "3:04PM")

func (*TimeWindowTimeRange) Marshal

func (m *TimeWindowTimeRange) Marshal() (dAtA []byte, err error)

func (*TimeWindowTimeRange) MarshalTo

func (m *TimeWindowTimeRange) MarshalTo(dAtA []byte) (int, error)

func (*TimeWindowTimeRange) MarshalToSizedBuffer

func (m *TimeWindowTimeRange) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TimeWindowTimeRange) ProtoMessage

func (*TimeWindowTimeRange) ProtoMessage()

func (*TimeWindowTimeRange) Reset

func (m *TimeWindowTimeRange) Reset()

func (*TimeWindowTimeRange) Size

func (m *TimeWindowTimeRange) Size() (n int)

func (*TimeWindowTimeRange) String

func (m *TimeWindowTimeRange) String() string

func (*TimeWindowTimeRange) Unmarshal

func (m *TimeWindowTimeRange) Unmarshal(dAtA []byte) error

func (*TimeWindowTimeRange) Validate

func (t *TimeWindowTimeRange) Validate() error

Validate ensures the TimeWindowTimeRange is valid.

func (*TimeWindowTimeRange) XXX_DiscardUnknown

func (m *TimeWindowTimeRange) XXX_DiscardUnknown()

func (*TimeWindowTimeRange) XXX_Marshal

func (m *TimeWindowTimeRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimeWindowTimeRange) XXX_Merge

func (m *TimeWindowTimeRange) XXX_Merge(src proto.Message)

func (*TimeWindowTimeRange) XXX_Size

func (m *TimeWindowTimeRange) XXX_Size() int

func (*TimeWindowTimeRange) XXX_Unmarshal

func (m *TimeWindowTimeRange) XXX_Unmarshal(b []byte) error

type TimeWindowWhen

type TimeWindowWhen struct {
	// Days is a hash of days
	Days                 TimeWindowDays `protobuf:"bytes,1,opt,name=days,proto3" json:"days"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

TimeWindowWhen defines the "when" attributes for time windows

func NewPopulatedTimeWindowWhen

func NewPopulatedTimeWindowWhen(r randyTimeWindow, easy bool) *TimeWindowWhen

func (*TimeWindowWhen) Descriptor

func (*TimeWindowWhen) Descriptor() ([]byte, []int)

func (*TimeWindowWhen) Equal

func (this *TimeWindowWhen) Equal(that interface{}) bool

func (*TimeWindowWhen) GetDays

func (m *TimeWindowWhen) GetDays() TimeWindowDays

func (*TimeWindowWhen) InWindows

func (t *TimeWindowWhen) InWindows(current time.Time) (bool, error)

InWindows determines if the current time falls between the provided time windows. Current should typically be time.Now() but to allow easier tests, it must be provided as a parameter. The function returns a positive value as soon the current time falls within a time window

func (*TimeWindowWhen) MapTimeWindows

func (t *TimeWindowWhen) MapTimeWindows() map[string][]*TimeWindowTimeRange

MapTimeWindows returns a map of all the time windows in t.

func (*TimeWindowWhen) Marshal

func (m *TimeWindowWhen) Marshal() (dAtA []byte, err error)

func (*TimeWindowWhen) MarshalTo

func (m *TimeWindowWhen) MarshalTo(dAtA []byte) (int, error)

func (*TimeWindowWhen) MarshalToSizedBuffer

func (m *TimeWindowWhen) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TimeWindowWhen) ProtoMessage

func (*TimeWindowWhen) ProtoMessage()

func (*TimeWindowWhen) Reset

func (m *TimeWindowWhen) Reset()

func (*TimeWindowWhen) Size

func (m *TimeWindowWhen) Size() (n int)

func (*TimeWindowWhen) String

func (m *TimeWindowWhen) String() string

func (*TimeWindowWhen) Unmarshal

func (m *TimeWindowWhen) Unmarshal(dAtA []byte) error

func (*TimeWindowWhen) Validate

func (t *TimeWindowWhen) Validate() error

Validate ensures that all the time windows in t can be parsed.

func (*TimeWindowWhen) XXX_DiscardUnknown

func (m *TimeWindowWhen) XXX_DiscardUnknown()

func (*TimeWindowWhen) XXX_Marshal

func (m *TimeWindowWhen) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimeWindowWhen) XXX_Merge

func (m *TimeWindowWhen) XXX_Merge(src proto.Message)

func (*TimeWindowWhen) XXX_Size

func (m *TimeWindowWhen) XXX_Size() int

func (*TimeWindowWhen) XXX_Unmarshal

func (m *TimeWindowWhen) XXX_Unmarshal(b []byte) error

type Tokens

type Tokens struct {
	// Access token is used by client to make request
	Access string `protobuf:"bytes,1,opt,name=access,proto3" json:"access_token"`
	// ExpiresAt unix timestamp describing when the access token is no longer
	// valid
	ExpiresAt int64 `protobuf:"varint,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at"`
	// Refresh token is used by client to request a new access token
	Refresh              string   `protobuf:"bytes,3,opt,name=refresh,proto3" json:"refresh_token"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Tokens contains the structure for exchanging tokens with the API

func FixtureTokens

func FixtureTokens(accessToken, refreshToken string) *Tokens

FixtureTokens given an access and refresh tokens returns valid tokens for use in tests

func NewPopulatedTokens

func NewPopulatedTokens(r randyAuthentication, easy bool) *Tokens

func (*Tokens) Descriptor

func (*Tokens) Descriptor() ([]byte, []int)

func (*Tokens) Equal

func (this *Tokens) Equal(that interface{}) bool

func (*Tokens) GetAccess

func (m *Tokens) GetAccess() string

func (*Tokens) GetExpiresAt

func (m *Tokens) GetExpiresAt() int64

func (*Tokens) GetRefresh

func (m *Tokens) GetRefresh() string

func (*Tokens) Marshal

func (m *Tokens) Marshal() (dAtA []byte, err error)

func (*Tokens) MarshalTo

func (m *Tokens) MarshalTo(dAtA []byte) (int, error)

func (*Tokens) MarshalToSizedBuffer

func (m *Tokens) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Tokens) ProtoMessage

func (*Tokens) ProtoMessage()

func (*Tokens) Reset

func (m *Tokens) Reset()

func (*Tokens) Size

func (m *Tokens) Size() (n int)

func (*Tokens) String

func (m *Tokens) String() string

func (*Tokens) Unmarshal

func (m *Tokens) Unmarshal(dAtA []byte) error

func (*Tokens) Validate

func (t *Tokens) Validate() error

Validate returns an error if the tokens contain invalid values.

func (*Tokens) XXX_DiscardUnknown

func (m *Tokens) XXX_DiscardUnknown()

func (*Tokens) XXX_Marshal

func (m *Tokens) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Tokens) XXX_Merge

func (m *Tokens) XXX_Merge(src proto.Message)

func (*Tokens) XXX_Size

func (m *Tokens) XXX_Size() int

func (*Tokens) XXX_Unmarshal

func (m *Tokens) XXX_Unmarshal(b []byte) error

type TypeMeta

type TypeMeta struct {
	// Type is the type name of the data type
	Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"type" yaml: "type,omitempty"`
	// APIVersion is the APIVersion of the data type
	APIVersion           string   `protobuf:"bytes,2,opt,name=APIVersion,proto3" json:"api_version" yaml: "api_version,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TypeMeta is information that can be used to resolve a data type

func NewPopulatedTypeMeta

func NewPopulatedTypeMeta(r randyMeta, easy bool) *TypeMeta

func (*TypeMeta) Descriptor

func (*TypeMeta) Descriptor() ([]byte, []int)

func (*TypeMeta) Equal

func (this *TypeMeta) Equal(that interface{}) bool

func (*TypeMeta) GetAPIVersion

func (m *TypeMeta) GetAPIVersion() string

func (*TypeMeta) GetType

func (m *TypeMeta) GetType() string

func (*TypeMeta) Marshal

func (m *TypeMeta) Marshal() (dAtA []byte, err error)

func (*TypeMeta) MarshalTo

func (m *TypeMeta) MarshalTo(dAtA []byte) (int, error)

func (*TypeMeta) MarshalToSizedBuffer

func (m *TypeMeta) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TypeMeta) ProtoMessage

func (*TypeMeta) ProtoMessage()

func (*TypeMeta) Reset

func (m *TypeMeta) Reset()

func (*TypeMeta) Size

func (m *TypeMeta) Size() (n int)

func (*TypeMeta) String

func (m *TypeMeta) String() string

func (*TypeMeta) Unmarshal

func (m *TypeMeta) Unmarshal(dAtA []byte) error

func (*TypeMeta) XXX_DiscardUnknown

func (m *TypeMeta) XXX_DiscardUnknown()

func (*TypeMeta) XXX_Marshal

func (m *TypeMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TypeMeta) XXX_Merge

func (m *TypeMeta) XXX_Merge(src proto.Message)

func (*TypeMeta) XXX_Size

func (m *TypeMeta) XXX_Size() int

func (*TypeMeta) XXX_Unmarshal

func (m *TypeMeta) XXX_Unmarshal(b []byte) error

type User

type User struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	// Password is used to define the cleartext password. It was also previously
	// used to store the hashed password
	Password string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Groups   []string `protobuf:"bytes,3,rep,name=groups,proto3" json:"groups,omitempty"`
	Disabled bool     `protobuf:"varint,4,opt,name=disabled,proto3" json:"disabled"`
	// PasswordHash is the hashed password, which is safe to display
	PasswordHash         string   `protobuf:"bytes,5,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

User describes an authenticated user

func FixtureUser

func FixtureUser(username string) *User

FixtureUser returns a testing fixture for an Entity object.

func NewPopulatedUser

func NewPopulatedUser(r randyUser, easy bool) *User

func (*User) Descriptor

func (*User) Descriptor() ([]byte, []int)

func (*User) Equal

func (this *User) Equal(that interface{}) bool

func (*User) Fields

func (u *User) Fields() map[string]string

Fields returns a set of fields that represent that resource

func (*User) GetDisabled

func (m *User) GetDisabled() bool

func (*User) GetGroups

func (m *User) GetGroups() []string

func (*User) GetMetadata

func (u *User) GetMetadata() *ObjectMeta

TODO: We may want to add metadata field to the User type.

func (*User) GetObjectMeta

func (u *User) GetObjectMeta() ObjectMeta

GetObjectMeta is a dummy implementation to meet the Resource interface.

func (*User) GetPassword

func (m *User) GetPassword() string

func (*User) GetPasswordHash

func (m *User) GetPasswordHash() string

func (*User) GetUsername

func (m *User) GetUsername() string

func (*User) Marshal

func (m *User) Marshal() (dAtA []byte, err error)

func (*User) MarshalTo

func (m *User) MarshalTo(dAtA []byte) (int, error)

func (*User) MarshalToSizedBuffer

func (m *User) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) RBACName

func (*User) RBACName() string

func (*User) Reset

func (m *User) Reset()

func (*User) SetMetadata

func (u *User) SetMetadata(meta *ObjectMeta)

func (*User) SetNamespace

func (u *User) SetNamespace(namespace string)

SetNamespace sets the namespace of the resource.

func (*User) SetObjectMeta

func (u *User) SetObjectMeta(meta ObjectMeta)

SetObjectMeta is a dummy implementation to meet the Resource interface.

func (*User) Size

func (m *User) Size() (n int)

func (*User) StoreName

func (u *User) StoreName() string

func (*User) StorePrefix

func (u *User) StorePrefix() string

StorePrefix returns the path prefix to this resource in the store

func (*User) String

func (m *User) String() string

func (*User) URIPath

func (u *User) URIPath() string

URIPath is the URI path component to a user.

func (*User) Unmarshal

func (m *User) Unmarshal(dAtA []byte) error

func (*User) Validate

func (u *User) Validate() error

Validate returns an error if the entity is invalid.

func (*User) ValidatePassword

func (u *User) ValidatePassword() error

ValidatePassword returns an error if the entity is invalid.

func (*User) XXX_DiscardUnknown

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal

func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*User) XXX_Merge

func (m *User) XXX_Merge(src proto.Message)

func (*User) XXX_Size

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal

func (m *User) XXX_Unmarshal(b []byte) error

type Version

type Version struct {
	Etcd         *etcdVersion.Versions `json:"etcd"`
	SensuBackend string                `json:"sensu_backend"`
	APIGroups    map[string]string     `json:"api_groups"`
}

Version holds the current etcd server and cluster version, and the sensu-backend version.

func FixtureVersion

func FixtureVersion() *Version

FixtureVersion returns a Version fixture for testing.

Directories

Path Synopsis
internal
js
Package js provides facilities based on the Otto VM for parsing and executing javascript expressions.
Package js provides facilities based on the Otto VM for parsing and executing javascript expressions.

Jump to

Keyboard shortcuts

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