"controller/api/grpc.go" did not exist on "42625c4f9a69375754c58b15522cb06c71963053"
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("%T %v already exists", e.Item, 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", reflect.TypeOf(e.Value).Elem(), reflect.TypeOf(e.Type).Elem())
// 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))
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
// ErrUnsupportedSbiType implements the Error interface and is called if the
// wrong Type for a SBI has been provided.
type ErrUnsupportedSbiType struct {
Type interface{}
}
func (e ErrUnsupportedSbiType) Error() string {
return fmt.Sprintf("SBI type not supported: %v", e.Type)
}
// ErrPluginVersion implements the Error interface and is called if the Version
// of a Plugin is older than a Plugin in use.
type ErrPluginVersion struct {
PlugID, ProvidedVer, UsedVer string
}
func (e ErrPluginVersion) Error() string {
return fmt.Sprintf("Version of Plugin: %s is older than the one in use. Provided: %s, in use: %s", e.PlugID, e.ProvidedVer, e.UsedVer)
}
// ErrorList implements the Error interface and is called if a slice of errors
// should be returned. The slice of errors is combined into a single error
// message and returned.
type ErrorList struct {
Errors []error
}
func (e ErrorList) Error() string {
combinedErrString := "Errors found:"
for i, err := range e.Errors {
errString := fmt.Sprintf("\n %v. %v", i+1, err)
combinedErrString = combinedErrString + errString
}
return combinedErrString
}
// ErrTypeNotSupported implements the Error interface and is called if the
// wrong Type has been provided.
type ErrTypeNotSupported struct {
Type interface{}
}
func (e ErrTypeNotSupported) Error() string {
return fmt.Sprintf("type not supported: %v", reflect.TypeOf(e.Type))
}
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
// ErrCouldNotMarshall implements Error interface and is called if a
// database respone can not be parsed.
type ErrCouldNotMarshall struct {
StoreName string
}
func (e ErrCouldNotMarshall) Error() string {
return fmt.Sprintf("could not marshall %s", e.StoreName)
}
// ErrCouldNotUpdate implements the Error interface and is called if a
// stored item can not be updated.
type ErrCouldNotUpdate struct {
StoreName string
}
func (e ErrCouldNotUpdate) Error() string {
return fmt.Sprintf("could not update %s", e.StoreName)
}
// ErrCouldNotFind implements the Error interface and is called if a
// stored item can not be found.
type ErrCouldNotFind struct {
StoreName string
}
func (e ErrCouldNotFind) Error() string {
return fmt.Sprintf("could not find %s", e.StoreName)
}
// ErrCouldNotCreate implements the Error interface and is called if a
// stored item can not be found.
type ErrCouldNotCreate struct {
StoreName string
}
func (e ErrCouldNotCreate) Error() string {
return fmt.Sprintf("could not create %s", e.StoreName)
}