Documentation
¶
Index ¶
- Variables
- type App
- func (*App) Descriptor() ([]byte, []int)deprecated
- func (x *App) GetEnv() string
- func (x *App) GetId() string
- func (x *App) GetMetadata() map[string]string
- func (x *App) GetName() string
- func (x *App) GetVersion() string
- func (*App) ProtoMessage()
- func (x *App) ProtoReflect() protoreflect.Message
- func (x *App) Reset()
- func (x *App) String() string
- func (m *App) Validate() error
- func (m *App) ValidateAll() error
- type AppMultiError
- type AppValidationError
Constants ¶
This section is empty.
Variables ¶
var File_runtime_app_v1_app_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// Unique identifier of the application
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Application name
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// Application version
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
// Application running environment (e.g.: dev, test, prod)
Env string `protobuf:"bytes,4,opt,name=env,proto3" json:"env,omitempty"`
// Application metadata stored as key-value pairs
Metadata map[string]string `` /* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
App defines the application's identity and metadata. StartTime is intentionally excluded as it's a runtime generated value.
func (*App) Descriptor
deprecated
func (*App) GetMetadata ¶
func (*App) GetVersion ¶
func (*App) ProtoMessage ¶
func (*App) ProtoMessage()
func (*App) ProtoReflect ¶
func (x *App) ProtoReflect() protoreflect.Message
func (*App) Validate ¶
Validate checks the field values on App with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*App) ValidateAll ¶
ValidateAll checks the field values on App with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AppMultiError, or nil if none found.
type AppMultiError ¶
type AppMultiError []error
AppMultiError is an error wrapping multiple validation errors returned by App.ValidateAll() if the designated constraints aren't met.
func (AppMultiError) AllErrors ¶
func (m AppMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AppMultiError) Error ¶
func (m AppMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AppValidationError ¶
type AppValidationError struct {
// contains filtered or unexported fields
}
AppValidationError is the validation error returned by App.Validate if the designated constraints aren't met.
func (AppValidationError) Cause ¶
func (e AppValidationError) Cause() error
Cause function returns cause value.
func (AppValidationError) Error ¶
func (e AppValidationError) Error() string
Error satisfies the builtin error interface
func (AppValidationError) ErrorName ¶
func (e AppValidationError) ErrorName() string
ErrorName returns error name.
func (AppValidationError) Field ¶
func (e AppValidationError) Field() string
Field function returns field value.
func (AppValidationError) Key ¶
func (e AppValidationError) Key() bool
Key function returns key value.
func (AppValidationError) Reason ¶
func (e AppValidationError) Reason() string
Reason function returns reason value.