commands

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConfigFile

func CreateConfigFile(dirPath string, email string) error

func GenerateKeyPair

func GenerateKeyPair() (ed25519.PublicKey, ed25519.PrivateKey, error)

func ValidateKeyPair

func ValidateKeyPair(pubKey ed25519.PublicKey, privKey ed25519.PrivateKey) bool

func WriteKeysToFile

func WriteKeysToFile(pubKeyPath string, privKeyPath string, pubKey ed25519.PublicKey, privKey ed25519.PrivateKey) error

Types

type Config

type Config struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

Config struct to hold the configuration data

type InitCmd

type InitCmd struct{}

func (*InitCmd) Execute

func (c *InitCmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

func (*InitCmd) Name

func (*InitCmd) Name() string

func (*InitCmd) SetFlags

func (c *InitCmd) SetFlags(f *flag.FlagSet)

func (*InitCmd) Synopsis

func (*InitCmd) Synopsis() string

func (*InitCmd) Usage

func (*InitCmd) Usage() string

type NewCmd

type NewCmd struct{}

func (*NewCmd) Execute

func (*NewCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

func (*NewCmd) Name

func (*NewCmd) Name() string

func (*NewCmd) SetFlags

func (*NewCmd) SetFlags(f *flag.FlagSet)

func (*NewCmd) Synopsis

func (*NewCmd) Synopsis() string

func (*NewCmd) Usage

func (*NewCmd) Usage() string

type SetCmd

type SetCmd struct{}

func (*SetCmd) Execute

func (c *SetCmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

func (*SetCmd) Name

func (*SetCmd) Name() string

func (*SetCmd) SetFlags

func (c *SetCmd) SetFlags(f *flag.FlagSet)

func (*SetCmd) Synopsis

func (*SetCmd) Synopsis() string

func (*SetCmd) Usage

func (*SetCmd) Usage() string

Jump to

Keyboard shortcuts

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