options

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliasOptions added in v0.4.2

type AliasOptions struct {
	*Options
	Force bool
}

type ExportOptions added in v0.4.0

type ExportOptions struct {
	*Options
	OutputFile *os.File
	Format     formats.Format
}

type FetchOptions added in v0.3.1

type FetchOptions struct {
	*Options
	OutputFile *os.File
	Alias      string
	Tags       []string
	UseNetRC   bool
}

type ImportOptions added in v0.4.0

type ImportOptions struct {
	*Options
	InputFiles []*os.File
	Alias      []string
	Tags       []string
}
type Link struct {
	From LinkTarget
	To   []LinkTarget
}

type LinkOptions added in v0.4.2

type LinkOptions struct {
	*Options
	Links []Link
}

type LinkTarget added in v0.4.2

type LinkTarget struct {
	ID, Alias string
	Type      LinkTargetType
}

func (*LinkTarget) String added in v0.4.2

func (lt *LinkTarget) String() string

type LinkTargetType added in v0.4.2

type LinkTargetType uint8
const (
	LinkTargetTypeNode LinkTargetType = iota
	LinkTargetTypeDocument
)

func (LinkTargetType) String added in v0.4.2

func (lt LinkTargetType) String() string

type MergeOptions added in v0.4.0

type MergeOptions struct {
	*Options
	DocumentName string
	Alias        string
	Tags         []string
}

type Option

type Option func(*Options)

func WithCacheDir

func WithCacheDir(dir string) Option

func WithConfigFile

func WithConfigFile(file string) Option

func WithContext added in v0.4.0

func WithContext(ctx context.Context) Option

func WithLogger

func WithLogger(l *log.Logger) Option

func WithVerbosity added in v0.4.0

func WithVerbosity(level int) Option

type Options

type Options struct {
	Logger *log.Logger

	CacheDir   string
	ConfigFile string
	Verbosity  int
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Options

func (*Options) Context added in v0.4.0

func (o *Options) Context() context.Context

func (*Options) WithCacheDir

func (o *Options) WithCacheDir(dir string) *Options

func (*Options) WithConfigFile

func (o *Options) WithConfigFile(file string) *Options

func (*Options) WithContext added in v0.4.0

func (o *Options) WithContext(ctx context.Context) *Options

func (*Options) WithLogger

func (o *Options) WithLogger(l *log.Logger) *Options

func (*Options) WithVerbosity added in v0.4.0

func (o *Options) WithVerbosity(level int) *Options

type PushOptions added in v0.3.1

type PushOptions struct {
	*Options
	Format   formats.Format
	UseTree  bool
	UseNetRC bool
}

Jump to

Keyboard shortcuts

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