Documentation
¶
Overview ¶
Package entity provides common layer for different objects and constants used across the project.
Index ¶
Constants ¶
View Source
const ( TransportHTTP = "http" TransportGRPC = "grpc" )
Variables ¶
View Source
var ( ErrBadAddressFormat = errors.New("expected address in host:port form") ErrBadKeyFile = errors.New("provided file doesn't contain key in the PEM format") ErrEncodingNotSupported = errors.New("encoding type not supported") ErrHTTP = errors.New("HTTP request failed") ErrHealthCheckNotSupported = errors.New("storage doesn't support healthcheck") ErrIncompleteRequest = errors.New("metrics value not set") ErrInvalidSignature = errors.New("invalid signature") ErrMetricInvalidName = errors.New("metric name contains invalid characters") ErrMetricLongName = errors.New("metric name is too long") ErrMetricNotFound = errors.New("metric not found") ErrMetricNotImplemented = errors.New("metric kind not supported") ErrNotSigned = errors.New("request not signed") ErrNotSupportedKey = errors.New("provided key type is not supported") ErrRecordKindDontMatch = errors.New("kind of recorded metric doesn't match request") ErrRestoreNoSource = errors.New("state restoration was requested, but path to store file is not set") ErrTransportNotSupported = errors.New("transport type not supported") ErrUnexpected = errors.New("unexpected error") ErrUntrustedSource = errors.New("request's source is not trusted") )
Functions ¶
func UntrustedSourceError ¶
Types ¶
type FilePath ¶
type FilePath string
A FilePath represents path to a file on local filesystem.
func (*FilePath) Set ¶
Set validates that provided path exists and assigns it to FilePath. Required by pflags interface.
type NetAddress ¶
type NetAddress string
A NetAddress represents network address in format ip:port, e.g. 0.0.0.0:8080.
func (*NetAddress) Set ¶
func (a *NetAddress) Set(src string) error
Set validates format of provided value and assigns it to NetAddress. Required by pflags interface.
func (NetAddress) String ¶
func (a NetAddress) String() string
String returns string representation of stored address. Required by pflags interface.
func (NetAddress) Type ¶
func (a NetAddress) Type() string
Type returns underlying type used to store NetAddress value. Required by pflags interface.
Click to show internal directories.
Click to hide internal directories.