sync

package
v0.3.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package sync provides a wrapper around the generated OpenAPI client for sync operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client wraps the generated OpenAPI client with convenience methods

func NewClient

func NewClient(baseURL string, authToken string) (*Client, error)

NewClient creates a new sync client

func (*Client) PullFlags

func (c *Client) PullFlags(ctx context.Context) (*flagset.Flagset, error)

PullFlags fetches flags from the remote API

func (*Client) PushFlags

func (c *Client) PushFlags(ctx context.Context, localFlags *flagset.Flagset, remoteFlags *flagset.Flagset, dryRun bool) (*PushResult, error)

PushFlags fetches remote flags, compares with local flags, and intelligently creates or updates flags as needed. Returns a PushResult with details of what was changed. If dryRun is true, only performs the comparison without making actual API calls.

type PushResult

type PushResult struct {
	Created   []flagset.Flag
	Updated   []flagset.Flag
	Unchanged []flagset.Flag
}

PushResult contains the results of a push operation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL