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 ( JSONIETFEncoding = "json_ietf" Target = "sonic" DefaultAddress = "127.0.0.1:8080" AgentUser = "hhagent" AgentPasswordFile = "agent-passwd" )
View Source
const ( PasswdLower = "abcdefghijklmnopqrstuvwxyz" PasswdUpper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" PasswdDigits = "0123456789" PasswdSymbols = "~!@#$%^&*()_+`-={}|[]\\:\"<>?,./" PasswdLength = 32 )
Variables ¶
View Source
var ( DefaultUsers = []string{"admin"} DefaultPasswords = []string{"YourPaSsWoRd"} )
View Source
var PasswdAlphabet = PasswdLower + PasswdUpper + PasswdDigits + PasswdSymbols
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.