Documentation
¶
Index ¶
- Constants
- Variables
- func Marshal(value ygot.ValidatedGoStruct) (map[string]any, error)
- func RandomPassword() (string, error)
- func Unmarshal(data []byte, dest ygot.ValidatedGoStruct) error
- func UnmarshalWithOpts(data []byte, dest ygot.ValidatedGoStruct, opts ...ytypes.UnmarshalOpt) error
- type Client
- func (c *Client) Close() error
- func (c *Client) Get(ctx context.Context, path string, dest ygot.ValidatedGoStruct, ...) error
- func (c *Client) GetWithOpts(ctx context.Context, path string, dest ygot.ValidatedGoStruct, extract bool, ...) error
- func (c *Client) Set(ctx context.Context, req *gnmi.SetRequest) error
- type ExtractOpt
Constants ¶
View Source
const ( JSON_IETF = "json_ietf" TARGET = "sonic" DEFAULT_ADDRESS = "127.0.0.1:8080" PASSWORD_FILE = "agent-passwd" AGENT_USER = "hhagent" )
View Source
const ( PASSWD_LOWER = "abcdefghijklmnopqrstuvwxyz" PASSWD_UPPER = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" PASSWD_DIGITS = "0123456789" PASSWD_SYMBOLS = "~!@#$%^&*()_+`-={}|[]\\:\"<>?,./" PASSWD_LENGTH = 32 )
Variables ¶
View Source
var ( DEFAULT_USERS = []string{"admin"} DEFAULT_PASSWORDS = []string{"YourPaSsWoRd"} )
View Source
var PASSWD_ALPHABET = PASSWD_LOWER + PASSWD_UPPER + PASSWD_DIGITS + PASSWD_SYMBOLS
Functions ¶
func RandomPassword ¶
func UnmarshalWithOpts ¶
func UnmarshalWithOpts(data []byte, dest ygot.ValidatedGoStruct, opts ...ytypes.UnmarshalOpt) error
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewInSONiC ¶
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, path string, dest ygot.ValidatedGoStruct, options ...api.GNMIOption) error
func (*Client) GetWithOpts ¶
func (c *Client) GetWithOpts(ctx context.Context, path string, dest ygot.ValidatedGoStruct, extract bool, options ...api.GNMIOption) error
type ExtractOpt ¶
type ExtractOpt struct{}
func (ExtractOpt) IsUnmarshalOpt ¶
func (ExtractOpt) IsUnmarshalOpt()
Click to show internal directories.
Click to hide internal directories.