Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigOperation = struct { CREATE ConfigOperationEnum DELETE ConfigOperationEnum }{ CREATE: ConfigOperationEnum("CREATE"), DELETE: ConfigOperationEnum("DELETE"), }
Enum of Operation on Config
View Source
var ErrorKind = struct { VALIDATION ErrorKindEnum INTERNAL ErrorKindEnum }{ VALIDATION: ErrorKindEnum("validation"), INTERNAL: ErrorKindEnum("internal"), }
Enum of Kind on Error
View Source
var LinkMode = struct { UNIDIRECTIONAL LinkModeEnum BIDIRECTIONAL LinkModeEnum }{ UNIDIRECTIONAL: LinkModeEnum("unidirectional"), BIDIRECTIONAL: LinkModeEnum("bidirectional"), }
Enum of Mode on Link
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api interface { // SetConfig create configuration for L1S SetConfig(config Config) (*string, error) // GetVersion description is TBD GetVersion() (Version, error) // GetLocalVersion provides version details of local client GetLocalVersion() Version // GetRemoteVersion provides version details received from remote server GetRemoteVersion() (Version, error) // SetVersionCompatibilityCheck allows enabling or disabling automatic version // compatibility check between client and server API spec version upon API call SetVersionCompatibilityCheck(bool) // CheckVersionCompatibility compares API spec version for local client and remote server, // and returns an error if they are not compatible according to Semantic Versioning 2.0.0 CheckVersionCompatibility() error // contains filtered or unexported methods }
Gol1SApi oTG L1S(Layer1Switch) Model
type Config ¶
type Config interface { Validation // provides marshal interface Marshal() marshalConfig // provides unmarshal interface Unmarshal() unMarshalConfig // A stringer function String() string // Clones the object Clone() (Config, error) // Links returns ConfigLinkIterIter, set in Config Links() ConfigLinkIter // Operation returns ConfigOperationEnum, set in Config Operation() ConfigOperationEnum // SetOperation assigns ConfigOperationEnum provided by user to Config SetOperation(value ConfigOperationEnum) Config // HasOperation checks if Operation has been set in Config HasOperation() bool // contains filtered or unexported methods }
Config is a container for L1S configuration.
type ConfigLinkIter ¶
type ConfigLinkIter interface { Items() []Link Add() Link Append(items ...Link) ConfigLinkIter Set(index int, newObj Link) ConfigLinkIter Clear() ConfigLinkIter // contains filtered or unexported methods }
type ConfigOperationEnum ¶
type ConfigOperationEnum string
type Constraints ¶
type Constraints interface {
ValueOf(name string) interface{}
}
All methods that perform validation will add errors here All api rpcs MUST call Validate
type Error ¶
type Error interface { Validation // provides marshal interface Marshal() marshalError // provides unmarshal interface Unmarshal() unMarshalError // A stringer function String() string // Clones the object Clone() (Error, error) // Code returns int32, set in Error. Code() int32 // SetCode assigns int32 provided by user to Error SetCode(value int32) Error // Kind returns ErrorKindEnum, set in Error Kind() ErrorKindEnum // SetKind assigns ErrorKindEnum provided by user to Error SetKind(value ErrorKindEnum) Error // HasKind checks if Kind has been set in Error HasKind() bool // Errors returns []string, set in Error. Errors() []string // SetErrors assigns []string provided by user to Error SetErrors(value []string) Error // implement Error function for implementingnative Error Interface. Error() string // contains filtered or unexported methods }
Error is error response generated while serving API request.
type ErrorKindEnum ¶
type ErrorKindEnum string
type GetVersionResponse ¶
type GetVersionResponse interface { Validation // provides marshal interface Marshal() marshalGetVersionResponse // provides unmarshal interface Unmarshal() unMarshalGetVersionResponse // A stringer function String() string // Clones the object Clone() (GetVersionResponse, error) // Version returns Version, set in GetVersionResponse. // Version is version details Version() Version // SetVersion assigns Version provided by user to GetVersionResponse. // Version is version details SetVersion(value Version) GetVersionResponse // HasVersion checks if Version has been set in GetVersionResponse HasVersion() bool // contains filtered or unexported methods }
GetVersionResponse is description is TBD
func NewGetVersionResponse ¶
func NewGetVersionResponse() GetVersionResponse
type GrpcTransport ¶
type GrpcTransport interface { // SetLocation set client connection to the given grpc target SetLocation(value string) GrpcTransport // Location get grpc target Location() string // SetRequestTimeout set timeout in grpc request SetRequestTimeout(value time.Duration) GrpcTransport // RequestTimeout get timeout in grpc request RequestTimeout() time.Duration // SetDialTimeout set timeout in grpc dial SetDialTimeout(value time.Duration) GrpcTransport // DialTimeout get timeout in grpc dial DialTimeout() time.Duration // SetClientConnection set grpc DialContext // SetClientConnection and (SetLocation, SetDialTimeout) are mutually exclusive SetClientConnection(con *grpc.ClientConn) GrpcTransport // ClientConnection get grpc DialContext ClientConnection() *grpc.ClientConn }
type HttpTransport ¶
type HttpTransport interface { SetLocation(value string) HttpTransport Location() string SetVerify(value bool) HttpTransport Verify() bool }
type Link ¶
type Link interface { Validation // provides marshal interface Marshal() marshalLink // provides unmarshal interface Unmarshal() unMarshalLink // A stringer function String() string // Clones the object Clone() (Link, error) // Src returns string, set in Link. Src() string // SetSrc assigns string provided by user to Link SetSrc(value string) Link // Dst returns string, set in Link. Dst() string // SetDst assigns string provided by user to Link SetDst(value string) Link // Mode returns LinkModeEnum, set in Link Mode() LinkModeEnum // SetMode assigns LinkModeEnum provided by user to Link SetMode(value LinkModeEnum) Link // HasMode checks if Mode has been set in Link HasMode() bool // contains filtered or unexported methods }
Link is link between the Ports.
type LinkModeEnum ¶
type LinkModeEnum string
type SetConfigResponse ¶
type SetConfigResponse interface { Validation // provides marshal interface Marshal() marshalSetConfigResponse // provides unmarshal interface Unmarshal() unMarshalSetConfigResponse // A stringer function String() string // Clones the object Clone() (SetConfigResponse, error) // ResponseString returns string, set in SetConfigResponse. ResponseString() string // SetResponseString assigns string provided by user to SetConfigResponse SetResponseString(value string) SetConfigResponse // HasResponseString checks if ResponseString has been set in SetConfigResponse HasResponseString() bool // contains filtered or unexported methods }
SetConfigResponse is description is TBD
func NewSetConfigResponse ¶
func NewSetConfigResponse() SetConfigResponse
type Validation ¶
type Validation interface { Warnings() []string // contains filtered or unexported methods }
type Version ¶
type Version interface { Validation // provides marshal interface Marshal() marshalVersion // provides unmarshal interface Unmarshal() unMarshalVersion // A stringer function String() string // Clones the object Clone() (Version, error) // ApiSpecVersion returns string, set in Version. ApiSpecVersion() string // SetApiSpecVersion assigns string provided by user to Version SetApiSpecVersion(value string) Version // HasApiSpecVersion checks if ApiSpecVersion has been set in Version HasApiSpecVersion() bool // SdkVersion returns string, set in Version. SdkVersion() string // SetSdkVersion assigns string provided by user to Version SetSdkVersion(value string) Version // HasSdkVersion checks if SdkVersion has been set in Version HasSdkVersion() bool // AppVersion returns string, set in Version. AppVersion() string // SetAppVersion assigns string provided by user to Version SetAppVersion(value string) Version // HasAppVersion checks if AppVersion has been set in Version HasAppVersion() bool // contains filtered or unexported methods }
Version is version details
func NewVersion ¶
func NewVersion() Version
Click to show internal directories.
Click to hide internal directories.