opsync

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, args []string) int

Types

type App

type App struct {
	// Config is file path.
	Config string

	// Help shows help message.
	Help bool

	// Debug enables debug log.
	Debug bool

	// Force enables force mode.
	Force bool

	// Type is the type of the secret to sync.
	Type string
	// contains filtered or unexported fields
}

func New

func New() *App

func (*App) Parse

func (app *App) Parse(args []string) error

Parse parses command line arguments.

func (*App) Run

func (app *App) Run(ctx context.Context) error

Run runs the application.

type Config

type Config struct {
	Secrets map[string]map[string]any `yaml:"secrets"`
}

func ParseConfig

func ParseConfig(filename string) (*Config, error)

type Planner

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

func NewPlanner

func NewPlanner(cfg *PlannerOptions) *Planner

func (*Planner) Plan

func (p *Planner) Plan(ctx context.Context) ([]backends.Plan, error)

Plan plans all secrets.

func (*Planner) PlanWithSecrets added in v0.2.3

func (p *Planner) PlanWithSecrets(ctx context.Context, secrets []string) ([]backends.Plan, error)

PlanWithSecrets plans the specified secrets.

func (Planner) PlanWithType added in v0.2.3

func (p Planner) PlanWithType(ctx context.Context, type_ string) ([]backends.Plan, error)

PlanWithType plans the specified type secrets.

type PlannerOptions

type PlannerOptions struct {
	Config            *Config
	OnePassword       *op.Service
	GitHub            *gh.Service
	AWSSTS            *awssts.Service
	AWSSSM            *svcssm.Service
	AWSSecretsManager *svcsecretsmanager.Service
}

Jump to

Keyboard shortcuts

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