Documentation
¶
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 handles GitHub operations for backing up dashboards.
func NewClient ¶
func NewClient(opts *ClientOptions) *Client
NewClient creates a new Client with authentication.
type ClientOptions ¶
type ClientOptions struct {
Client *github.Client
Repository Repository
Branch string
Directory string
Logger *slog.Logger
}
ClientOptions contains options for creating a Client.
type Config ¶
type Config struct {
Repository Repository `yaml:"repository" validate:"required"`
Branch string `yaml:"branch" validate:"required"`
Directory string `yaml:"directory" validate:"required"`
APIURL string `yaml:"api_url" validate:"omitempty,url"`
}
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository represents a GitHub repository in "owner/repo" format.
func NewRepository ¶
func NewRepository(owner, repo string) (*Repository, error)
NewRepository creates a new Repository with the given owner and repo. NewRepository returns an error if owner or repo is empty.
func (*Repository) Name ¶
func (r *Repository) Name() string
Name returns the full repository name in "owner/repo" format.
func (*Repository) UnmarshalYAML ¶
func (r *Repository) UnmarshalYAML(unmarshal func(any) error) error
UnmarshalYAML implements yaml.Unmarshaler for parsing "owner/repo" format.
Click to show internal directories.
Click to hide internal directories.