Documentation ¶
Overview ¶
Package devicevalidation provides the use-case of matching a device to a valid version number.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidArgument = errors.New("invalid argument")
ErrInvalidArgument is returned when one or more arguments are invalid.
Functions ¶
Types ¶
type ErrCurrentVersionNotParseable ¶
type ErrCurrentVersionNotParseable struct {
Version string
}
ErrCurrentVersionNotParseable is returned when a current version is not parseable.
func (*ErrCurrentVersionNotParseable) Error ¶
func (e *ErrCurrentVersionNotParseable) Error() string
type ErrRequiredVersionNotParseable ¶
type ErrRequiredVersionNotParseable struct {
Version string
}
ErrRequiredVersionNotParseable is returned when a required version is not parseable.
func (*ErrRequiredVersionNotParseable) Error ¶
func (e *ErrRequiredVersionNotParseable) Error() string
type Service ¶
type Service interface { // Validate a deviceType and its current version. Return the compliance // state and required version to be compliant. Validate(deviceType string, currentVersion string) (bool, string, error) }
Service is the interface that provides the Validate method.
func NewInstrumentingService ¶
NewInstrumentingService returns an instance of an instrumenting Service.
func NewLoggingService ¶
NewLoggingService returns a new instance of a logging Service.
func NewService ¶
func NewService(deviceMappings devicemapping.Repository) Service
NewService returns a new instance of the default Service.
Click to show internal directories.
Click to hide internal directories.