Versions in this module Expand all Collapse all v0 v0.1.1 Nov 12, 2026 v0.1.0 Nov 12, 2026 Changes in this version + const DefaultBackoffDelayFactor + const DefaultBackoffMaxDelay + const DefaultBackoffMinDelay + const DefaultDefaultMaxAsyncWaitTime + const DefaultMaxRetries + const DefaultPlanPollInterval + const MopCanceled + const MopFailed + const MopPending + const MopRunning + const MopSuccess + var ErrMopJobWait = errors.New("the job is not finished") + func Accept(v string) func(req *Req) + func AfterWrite(fn func(ctx context.Context, res Res) error) func(*Req) + func BackoffDelayFactor(x float64) func(*Client) + func BackoffMaxDelay(x int) func(*Client) + func BackoffMinDelay(x int) func(*Client) + func ContentType(v string) func(req *Req) + func Context(ctx context.Context) func(req *Req) + func DefaultMaxAsyncWaitTime(x int) func(*Client) + func Insecure(x bool) func(*Client) + func IsConflict(err error) bool + func IsNotFound(err error) bool + func IsPlanFailed(err error) bool + func IsPlanTimeout(err error) bool + func IsSessionLimit(err error) bool + func IsUnauthorized(err error) bool + func JWTService(x string) func(*Client) + func MaxAsyncWaitTime(seconds int) func(req *Req) + func MaxRetries(x int) func(*Client) + func NSORetry(timeoutSeconds int) func(*Client) + func NoLogPayload(req *Req) + func NoResultCheck(req *Req) + func NoWait(req *Req) + func PlanPath(path string) func(req *Req) + func PlanPollInterval(x time.Duration) func(*Client) + func Query(k, v string) func(req *Req) + func ReadOnly(req *Req) + func RequestTimeout(x time.Duration) func(*Client) + func ResultCheck(fn func(Res) error) func(*Req) + func RetryNonIdempotent(req *Req) + func RetryOnErrorCodes(x []int) func(*Client) + func StatusCode(err error) int + func Timeout(timeoutSeconds int) func(req *Req) + func UseMutex(req *Req) + func UseMutexKey(key string) func(*Req) + func UserAgent(x string) func(*Client) + func WithToken(jwt string) func(*Client) + type APIError struct + Body string + Code string + EntryStatus []int + Message string + Method string + RestconfErrors []RestconfError + StatusCode int + URL string + func (e *APIError) Error() string + func (e *APIError) HasRestconfTag(tag string) bool + type ApplyMessage struct + Message string + Status string + Template string + func ParseApplyMessages(s string) []ApplyMessage + type Body struct + Str string + func (body Body) Delete(path string) Body + func (body Body) Res() Res + func (body Body) Set(path string, value interface{}) Body + func (body Body) SetRaw(path, rawValue string) Body + type BodyPager struct + Body string + FirstPage int + ItemsPath string + PaginationPath string + Path string + Size int + func (b *BodyPager) Items(res Res) []Res + func (b *BodyPager) Next(prev *PageResult) (PageRequest, bool) + type Client struct + BackoffDelayFactor float64 + BackoffMaxDelay int + BackoffMinDelay int + DefaultMaxAsyncWaitTime int + HttpClient *http.Client + JWTService string + MaxRetries int + NSOLockTimeout int + PlanPollInterval time.Duration + RetryOnErrorCodes []int + Url string + UserAgent string + func NewClient(url, usr, pwd string, mods ...func(*Client)) (Client, error) + func (client *Client) Authenticate() error + func (client *Client) Backoff(attempts int) bool + func (client *Client) Delete(path string, mods ...func(*Req)) (Res, error) + func (client *Client) DeleteBody(path, data string, mods ...func(*Req)) (Res, error) + func (client *Client) Do(req Req) (Res, error) + func (client *Client) Get(path string, mods ...func(*Req)) (Res, error) + func (client *Client) Login() error + func (client *Client) Logout() error + func (client *Client) MopJob(id string, mods ...func(*Req)) (MopJob, error) + func (client *Client) MopJobOutcome(id string, mods ...func(*Req)) (MopJobOutcome, error) + func (client *Client) MopJobResourceDetail(jobID, resourceID string, mods ...func(*Req)) (MopJobFailure, error) + func (client *Client) MopJobResources(id string, mods ...func(*Req)) ([]MopJobResource, error) + func (client *Client) Paginate(p Pager, mods ...func(*Req)) ([]Res, error) + func (client *Client) Patch(path, data string, mods ...func(*Req)) (Res, error) + func (client *Client) Post(path, data string, mods ...func(*Req)) (Res, error) + func (client *Client) Put(path, data string, mods ...func(*Req)) (Res, error) + func (client *Client) WaitForMopJob(interval, timeout time.Duration) func(*Req) + func (client *Client) WaitForPlan(planPath string, gone bool, maxSeconds int) error + func (client *Client) WaitMopJob(ctx context.Context, id string, interval, timeout time.Duration, ...) (MopJob, error) + func (client *Client) YangPatch(path, patchID, comment string, edits []YangPatchEdit, mods ...func(*Req)) (Res, error) + func (client Client) NewReq(method, uri string, body io.Reader, mods ...func(*Req)) Req + func (client Client) WithContext(ctx context.Context) Client + type CursorPager struct + Body string + CursorField string + ItemCursor string + ItemsPath string + Limit int + LimitField string + Path string + func NewCursorPager(path, body string, limit int) *CursorPager + func (c *CursorPager) Items(res Res) []Res + func (c *CursorPager) Next(prev *PageResult) (PageRequest, bool) + type FilterDataPager struct + Criteria string + Filter string + ItemsPath string + Path string + Size int + func (f *FilterDataPager) Items(res Res) []Res + func (f *FilterDataPager) Next(prev *PageResult) (PageRequest, bool) + type HeaderPager struct + Body string + HeaderPath string + ItemsPath string + Limit int + Path string + func (h *HeaderPager) Items(res Res) []Res + func (h *HeaderPager) Next(prev *PageResult) (PageRequest, bool) + type MopJob struct + ID string + Message string + Name string + Raw Res + Status string + func (j MopJob) Finished() bool + type MopJobFailure struct + Device string + DeviceUUID string + Message string + Messages []ApplyMessage + Result string + func (f MopJobFailure) String() string + type MopJobOutcome struct + Failures []MopJobFailure + Job MopJob + Resources []MopJobResource + func (o MopJobOutcome) OK() bool + type MopJobResource struct + DeviceUUID string + ID string + Name string + Raw Res + Result string + func (r MopJobResource) Finished() bool + type OffsetPager struct + ItemsPath string + Limit int + LimitParam string + OffsetParam string + Path string + func (o *OffsetPager) Items(res Res) []Res + func (o *OffsetPager) Next(prev *PageResult) (PageRequest, bool) + type PageNumberPager struct + FirstPage int + ItemsPath string + PageParam string + Path string + Size int + SizeParam string + func (p *PageNumberPager) Items(res Res) []Res + func (p *PageNumberPager) Next(prev *PageResult) (PageRequest, bool) + type PageRequest struct + Body string + Method string + Mods []func(*Req) + Path string + type PageResult struct + Fetched int + Items []Res + Page int + Res Res + type Pager interface + Items func(res Res) []Res + Next func(prev *PageResult) (PageRequest, bool) + type PlanError struct + Code string + Details []PlanStatusDetail + Failed bool + Message string + Path string + Raw string + State string + Timeout bool + func (e *PlanError) Error() string + type PlanStatusDetail struct + Code string + Context []string + ImpactedDevice string + Name string + RecommendedAction string + Severity string + Type string + type Req struct + AfterWrite func(ctx context.Context, res Res) error + HttpReq *http.Request + LogPayload bool + MaxAsyncWaitTime int + MutexKey string + NoWait bool + PlanPath string + ReadOnly bool + RetryNonIdempotent bool + Timeout time.Duration + UseMutex bool + type Res = gjson.Result + type RestconfError struct + AppTag string + Info string + Message string + Path string + Tag string + Type string + type TokenPager struct + Body string + ItemsPath string + OptionsPath string + PageSize int + Path string + func (t *TokenPager) Items(res Res) []Res + func (t *TokenPager) Next(prev *PageResult) (PageRequest, bool) + type WaitError struct + Err error + func (e *WaitError) Error() string + func (e *WaitError) Unwrap() error + type YangPatchEdit struct + Operation string + Target string + Value Body + func NewYangPatchEdit(operation, target string, value Body) YangPatchEdit