helper

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Copyright © 2024 Ayobami Bamigboye <[email protected]>

Index

Constants

View Source
const (
	ParentCommand  = "vault"
	InitSubCommand = "init"
)

Variables

View Source
var (
	ErrConfigEmpty      = errors.New("config loc is empty")
	ErrStoreTypeEmpty   = errors.New("store type is empty")
	ErrStoreTypeInvalid = errors.New("store type is invalid")
)
View Source
var (
	DefaultRootConfig = "~/.vault/cli"
	DefaultConfigLoc  = filepath.Join(DefaultRootConfig, "config")
	DefaultCipherLoc  = filepath.Join(DefaultRootConfig, ".cipher")
	DefaultStoreLoc   = filepath.Join(DefaultRootConfig, ".store")
	DefaultGobLoc     = filepath.Join(DefaultRootConfig, ".gob")
)

Functions

func Init

func Init(args ...string) ([]byte, error)

Types

type InstanceConfig

type InstanceConfig struct {
	ID          string `json:"id"`
	CipherLoc   string `json:"cipher_loc"`
	StoreLoc    string `json:"store_loc"`
	RedisString string `json:"redis_string"`
	StoreType   string `json:"store_type"`
	Debug       bool   `json:"debug"`
	LastUse     int64  `json:"last_login"`
}

func NewInstanceConfig

func NewInstanceConfig() *InstanceConfig

func (*InstanceConfig) JsonDecode

func (ic *InstanceConfig) JsonDecode() error

func (*InstanceConfig) JsonEncode

func (ic *InstanceConfig) JsonEncode(path string) error

func (*InstanceConfig) Manager

func (ic *InstanceConfig) Manager(ctx context.Context) (*tokenize.Manager, error)

Jump to

Keyboard shortcuts

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