config

package
v0.0.0-...-8beb243 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Sync     SyncType
	ReadOnly bool
}

Config is the config for the storage.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default config.

func (Config) WithAsyncSync

func (cfg Config) WithAsyncSync() Config

WithAsyncSync sets the async type.

func (Config) WithNoneSync

func (cfg Config) WithNoneSync() Config

WithNoneSync sets the none type.

func (Config) WithReadOnly

func (cfg Config) WithReadOnly() Config

WithReadOnly sets the read only type.

func (Config) WithReadWrite

func (cfg Config) WithReadWrite() Config

WithReadWrite sets the read write type.

func (Config) WithSync

func (cfg Config) WithSync() Config

WithSync sets the sync type.

type SyncType

type SyncType string

SyncType is the type of sync.

var (
	// SyncTypeNone is the none sync type.
	SyncTypeNone SyncType = "none"
	// SyncTypeSync is the sync sync type.
	SyncTypeSync SyncType = "sync"
	// SyncTypeAsync is the async sync type.
	SyncTypeAsync SyncType = "async"
)

Jump to

Keyboard shortcuts

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