-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
- Loading branch information
Showing
37 changed files
with
907 additions
and
983 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package openconfig | ||
package protoconfig | ||
|
||
type Configurable interface { | ||
// Decode parses byte slice as `Encoded Configuration Message` in JSON or proto format and unmarshal it on | ||
// the Configurable struct. It supports all `OpenConfig Proto Extensions Format 1.0` extenstion | ||
// the Configurable struct. It supports all `Proto Config Extensions Format 1.0` extenstion | ||
// (validation, default values etc). | ||
// Use `proto.Unmarshal` or `protojson.Unmarshal` for decoding without `OpenConfig 1.0` extension support. | ||
// Use `proto.Unmarshal` or `protojson.Unmarshal` for decoding without `ProtoConfig 1.0` extension support. | ||
Decode(ecm []byte) error | ||
// DecodeString parses string `Encoded Configuration Message` in JSON or proto format and unmarshal it on | ||
// the Configurable struct. It supports all `OpenConfig Proto Extensions Format 1.0` extenstion | ||
// the Configurable struct. It supports all `Proto Config Extensions Format 1.0` extenstion | ||
// (validation, default values etc). | ||
// Use `proto.Unmarshal` or `protojson.Unmarshal` for decoding without `OpenConfig 1.0` extension support. | ||
// Use `proto.Unmarshal` or `protojson.Unmarshal` for decoding without `ProtoConfig 1.0` extension support. | ||
DecodeString(ecm string) error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
package openconfig | ||
package protoconfig | ||
|
||
// Configurator allows to produce `Encoded Configuration Messages` from the `Configuration Proto Definition`. | ||
type Configurator interface { | ||
// Encode encodes self as `Encoded Configuration Message` in proto format so it can be understood and | ||
// passed to Configurable struct. It supports all `OpenConfig Proto Extensions Format 1.0` extenstion | ||
// passed to Configurable struct. It supports all `Proto Config Extensions Format 1.0` extenstion | ||
// (validation, default values etc). | ||
// Use `proto.Marshal` encoding without `OpenConfig 1.0` extension support. | ||
// Use `proto.Marshal` encoding without `ProtoConfig 1.0` extension support. | ||
Encode() ([]byte, error) | ||
// EncodeJSON encodes self as `Encoded Configuration Message` in JSON format so it can be understood and | ||
// passed to Configurable struct. It supports all `OpenConfig Proto Extensions Format 1.0` extenstion | ||
// Use `protojson.Marshal` encoding without `OpenConfig 1.0` extension support. | ||
// passed to Configurable struct. It supports all `Proto Config Extensions Format 1.0` extenstion | ||
// Use `protojson.Marshal` encoding without `ProtoConfig 1.0` extension support. | ||
EncodeJSON() ([]byte, error) | ||
|
||
// Metadata returns metadata defined in `OpenConfig Proto Extensions Format 1.0`. | ||
// Metadata returns metadata defined in `Proto Config Extensions Format 1.0`. | ||
Metadata() Metadata | ||
} |
Oops, something went wrong.