Newer
Older
// ErrNilClient implements the Error interface and is called if a GNMI Client is nil.
func (e *ErrNilClient) Error() string {
return fmt.Sprintf("client cannot be nil")
// ErrNil implements the Error interface and is called if a struct is nil.
type ErrNil struct {
}
func (e *ErrNil) Error() string {
return fmt.Sprintf("struct cannot be nil")
}
// ErrNotFound implements the Error interface and is called if a specific ID
// of a storable item could not be found.
type ErrNotFound struct {
func (e *ErrNotFound) Error() string {
return fmt.Sprintf("%v not found", e.ID)
// ErrAlreadyExists implements the Error interface and is called if a specific ID
// of a storable item already exists.
type ErrAlreadyExists struct {
}
func (e *ErrAlreadyExists) Error() string {
return fmt.Sprintf("%v already exists", e.Item)
// ErrInvalidUUID implements the Error interface and is called if a UUID is not valid.
type ErrInvalidUUID struct {
DeviceName string
}
func (e *ErrInvalidUUID) Error() string {
return fmt.Sprintf("UUID not valid")
}
// ErrInvalidTypeAssertion implements the Error interface and is called if the
// type of a storable item does not correspond to the expected type.
type ErrInvalidTypeAssertion struct {
}
func (e ErrInvalidTypeAssertion) Error() string {
return fmt.Sprintf("%v does not implement %v", e.Value, e.Type)
// ErrUnsupportedPath implements the Error interface and is called if the
// given path is not supported.
}
func (e ErrUnsupportedPath) Error() string {
return fmt.Sprintf("path %v is not supported", e.Path)
// ErrNotYetImplemented implements the Error interface and is called if a function
// is not implemented yet.
type ErrNotYetImplemented struct{}
func (e ErrNotYetImplemented) Error() string {
return fmt.Sprintf("function not yet implemented")
}
// ErrInvalidParameters implements the Error interface and is called if the wrong
// or no parameters have been provided.
}
func (e ErrInvalidParameters) Error() string {
return fmt.Sprintf("invalid parameters for %v: %v", e.Func, e.Param)
// ErrInvalidTransportOptions implements the Error interface and is called if the
// wrong TransportOptions have been provided.
}
func (e ErrInvalidTransportOptions) Error() string {
return fmt.Sprintf("invalid transport options: %v", reflect.TypeOf(e.Opt))
// ErrOperationNotSupported implements the Error interface and is called if the
// wrong Operation has been provided.
type ErrOperationNotSupported struct {
}
func (e ErrOperationNotSupported) Error() string {
return fmt.Sprintf("transport operation not supported: %v", reflect.TypeOf(e.Op))