Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
Id string `json:"id,omitzero" validate:"uuid,readOnly"`
Name base.Name `json:"name,omitzero"`
Kind base.Kind `json:"kind,omitzero"`
Version *float64 `json:"version,omitzero" validate:"positive,integer,readOnly"`
Description string `json:"description,omitzero" validate:"trim,max=250,allow="`
Tags AgentTags `json:"tags,omitzero" validate:"default={}"`
Created string `json:"created,omitzero" validate:"date,readOnly"`
LastModified string `json:"lastModified,omitzero" validate:"date,readOnly"`
Links base.Links `json:"links,omitzero" validate:"readOnly"`
Status *AgentStatus `json:"status,omitzero"`
}
func (Agent) ValidationRule ¶
ValidationRule reflects Agent.
type AgentInfo ¶
type AgentInfo struct {
ProtocolVersion AgentInfoProtocolVersion `json:"protocolVersion,omitzero"`
InstanceId string `json:"instanceId,omitzero"`
LastActive string `json:"lastActive,omitzero" validate:"date,iso"`
Env AgentInfoEnv `json:"env,omitzero"`
PeerCount *float64 `json:"peerCount,omitzero" validate:"positive,integer"`
ServiceCount *float64 `json:"serviceCount,omitzero" validate:"positive,integer"`
}
func (AgentInfo) ValidationRule ¶
ValidationRule reflects the -info beat payload (validated by the -info route).
type AgentInfoEnv ¶
type AgentInfoProtocolVersion ¶
type AgentInfoProtocolVersion string
const ( AgentInfoProtocolVersionV1 AgentInfoProtocolVersion = "v1" AgentInfoProtocolVersionV2 AgentInfoProtocolVersion = "v2" )
func (AgentInfoProtocolVersion) EnumValues ¶
func (AgentInfoProtocolVersion) EnumValues() []string
type AgentStatus ¶
type AgentStatus struct {
BootstrapConfig *BootstrapConfig `json:"bootstrapConfig,omitzero"`
ProtocolVersion AgentStatusProtocolVersion `json:"protocolVersion,omitzero"`
}
type AgentStatusProtocolVersion ¶
type AgentStatusProtocolVersion string
const ( AgentStatusProtocolVersionV1 AgentStatusProtocolVersion = "v1" AgentStatusProtocolVersionV2 AgentStatusProtocolVersion = "v2" )
func (AgentStatusProtocolVersion) EnumValues ¶
func (AgentStatusProtocolVersion) EnumValues() []string
type AgentTags ¶
AgentTags aliases base.Tags so the reflection base-type registry resolves it to the shared TagsRule.
type BootstrapConfig ¶
type BootstrapConfig struct {
RegistrationToken string `json:"registrationToken" validate:"required"`
AgentId string `json:"agentId" validate:"required"`
AgentLink string `json:"agentLink" validate:"required"`
HubEndpoint HttpHttpsUri `json:"hubEndpoint" validate:"required"`
ProtocolVersion BootstrapConfigProtocolVersion `json:"protocolVersion,omitzero"`
}
type BootstrapConfigProtocolVersion ¶
type BootstrapConfigProtocolVersion string
const ( BootstrapConfigProtocolVersionV1 BootstrapConfigProtocolVersion = "v1" BootstrapConfigProtocolVersionV2 BootstrapConfigProtocolVersion = "v2" )
func (BootstrapConfigProtocolVersion) EnumValues ¶
func (BootstrapConfigProtocolVersion) EnumValues() []string
type HttpHttpsUri ¶
type HttpHttpsUri string
HttpHttpsUri is a URI restricted to the http/https schemes — the strongly-typed replacement for the `uri,custom=uriHttpHttps` tag (Joi.string().uri({scheme: ['http','https']})).
func (HttpHttpsUri) ValidationRule ¶
func (HttpHttpsUri) ValidationRule() *validate.Rule
ValidationRule ports agent.ts:9 `Joi.string().uri({scheme:['http','https']})`. Joi reports string.uriCustomScheme for EVERY failure once a scheme option is present — including a value that is not a URI at all — so the .URI() rule cannot run first (it answered string.uri for "not a uri" where TS answers string.uriCustomScheme). The scheme list renders as Joi's alternation ("http|https"), not as Go's [http https], and the message quotes the LABEL, not the value.