cmd

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accounts

type Accounts struct {
	List   ListAccounts  `cmd:"" help:"List configured accounts."`
	Login  Login         `cmd:"" help:"Log in to a matrix server."`
	Select SelectAccount `cmd:"" help:"Set the current account."`
	Remove RemoveAccount `cmd:"" help:"Remove a stored account."`
}

type ListAccounts

type ListAccounts struct{}

func (*ListAccounts) Run

func (l *ListAccounts) Run(ts *auth.TokenStore) error

type ListRooms

type ListRooms struct {
	Account string `optional:"" short:"a" help:"Which account to send from."`
}

func (*ListRooms) Run

func (l *ListRooms) Run(ts *auth.TokenStore) error

type Login

type Login struct {
	Homeserver string `arg:"" help:"The homeserver to log into. With protocol."`

	Name     string `help:"The name to identify this account by." short:"n" group:"login"`
	Username string `help:"The account username." short:"u" group:"login"`
	Password string `help:"The account password." short:"p" group:"login"`
}

func (*Login) Run

func (l *Login) Run(ts *auth.TokenStore) error

type RemoveAccount

type RemoveAccount struct {
	Name string `arg:"" help:"Account to remove."`
}

func (*RemoveAccount) Run

func (s *RemoveAccount) Run(ts *auth.TokenStore) error

type Rooms

type Rooms struct {
	List ListRooms `cmd:"" help:"List joined rooms."`
}

type SelectAccount

type SelectAccount struct {
	Name string `arg:"" help:"Set account to be the current account."`
}

func (*SelectAccount) Run

func (s *SelectAccount) Run(ts *auth.TokenStore) error

type Send

type Send struct {
	Account string `optional:"" short:"a" help:"Which account to send from."`
	Title   string `help:"Use rich formatting. If used, msg will be wrapped in a <blockquote> tag."`
	Room    string `arg:"" name:"room" help:"Can be a room ID or a room alias."`
	Msg     string `arg:"" optional:"" name:"msg" help:"Text to send to room. Leave empty to read from stdin."`
}

func (*Send) Run

func (s *Send) Run(ts *auth.TokenStore) error

Jump to

Keyboard shortcuts

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