option

package
v0.0.0-...-37dd400 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(g *Command, tx string)

Decrypt will trigger decryption of yaml file

func Encrypt

func Encrypt(g *Command)

Encrypt will trigger encryption of yaml file

func Root

func Root(args []string) error

Root Manage command line

func SendMessage

func SendMessage(t string, c int64, m string)

SendMessage send message to telegram chat

Types

type Command

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

Command struct for sub command name

func EncryptCommand

func EncryptCommand() *Command

EncryptCommand Contain flag command for encrypt

func SendCommand

func SendCommand() *Command

SendCommand Contain flag command for decrypt

func TextCommand

func TextCommand() *Command

TextCommand Contain flag command for sending text

func (*Command) Crypto

func (g *Command) Crypto()

Crypto to decide encryption or decryption

func (*Command) Init

func (g *Command) Init(args []string) error

Init get argument after subcommand

func (*Command) Name

func (g *Command) Name() string

Name to return subcommand name

func (*Command) ReadFile

func (g *Command) ReadFile() string

ReadFile to read content of file message

type Runner

type Runner interface {
	Init([]string) error
	Name() string
	Crypto()
}

Runner to run function with same method

Jump to

Keyboard shortcuts

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