repl

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package repl defines the dclish commands and implements the actions and defines the REPL to get the commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionAdd

func ActionAdd(cmd *dclish.Command) error

ActionAdd handles the `ADD` command. This adds a message to a folder.

This originally existed as the subroutine ADD in bulletin.for.

func ActionBack

func ActionBack(_ *dclish.Command) error

ActionBack handles the `BACK` command. Goes back and shows the previous message.

This originally existed as... not sure.

func ActionChange

func ActionChange(cmd *dclish.Command) error

ActionChange handles the `CHANGE` command. This replaces or modifies an existing message.

This originally existed as... not sure.

func ActionCopy

func ActionCopy(cmd *dclish.Command) error

ActionCopy handles the `COPY` command.

func ActionCreate

func ActionCreate(cmd *dclish.Command) error

ActionCreate handles the `CREATE` command. This creates a folder.

This originally existed as the subroutine CREATE_FOLDER in bulletin4.for.

func ActionCurrent

func ActionCurrent(_ *dclish.Command) error

ActionCurrent handles the `CURRENT` command. This shows the head of the current message.

This originally existed as... not sure.

func ActionDelete

func ActionDelete(cmd *dclish.Command) error

ActionDelete handles the `DELETE` command. This deletes a message. As of now this is permanent. It would need to be changed to support UNDELETE.

This originally existed as the subroutine DELETE_MSG in bulletin0.for.

func ActionDirectory

func ActionDirectory(cmd *dclish.Command) error

ActionDirectory handles the `DIRECTORY` command. This lists all the messages in the current folder.

This originally existed as the subroutines DIRECTORY in bulletin0.for and DIRECTORY_FOLDERS in bulletin5.for.

func ActionExit

func ActionExit(_ *dclish.Command) error

ActionExit handles the `EXIT` command. This exits BULLETIN.

func ActionFirst

func ActionFirst(_ *dclish.Command) error

ActionFirst handles the `FIRST` command. Prints the first message in a folder.

This originally existed as... not sure.

func ActionForward

func ActionForward(_ *dclish.Command) error

ActionForward handles the `FORWARD` command.

This originally existed as the subroutine MAIL in bulletin1.for.

func ActionHelp

func ActionHelp(cmd *dclish.Command) error

ActionHelp handles the `HELP` command. This provides help taxt for each command.

This originally existed as the subroutine HELP in bulletin8.for.

func ActionIndex

func ActionIndex(cmd *dclish.Command) error

ActionIndex handles the `INDEX` command. This lists all the folders.

This originally existed as the subroutine FULL_DIR in bulletin9.for.

func ActionLast

func ActionLast(_ *dclish.Command) error

ActionLast handles the `LAST` command. Prints the last message.

This originally existed as... not sure.

func ActionMail

func ActionMail(_ *dclish.Command) error

ActionMail handles the `MAIL` command.

This originally existed as the subroutine MAIL in bulletin1.for.

func ActionMark

func ActionMark(cmd *dclish.Command) error

ActionMark handles the `MARK` command. This sets a MARK on messages.

This originally existed as... not sure.

func ActionModify

func ActionModify(cmd *dclish.Command) error

ActionModify handles the `MODIFY` command. This modifies a folder.

This is based on `MODIFY_FOLDER` in bulletin1.for.

func ActionMove

func ActionMove(cmd *dclish.Command) error

ActionMove handles the `MOVE` command.

func ActionNext

func ActionNext(_ *dclish.Command) error

ActionNext handles the `NEXT` command. Shows the next message.

This originally existed as... not sure.

func ActionPrint

func ActionPrint(cmd *dclish.Command) error

ActionPrint handles the `PRINT` command. This sends the message in a way that the terminal will redirect it to an attached printer. Not many (any?) terminals support it now.

This originally existed as the subroutine PRINT in bulletin1.for.

func ActionQuit

func ActionQuit(_ *dclish.Command) error

ActionQuit handles the `QUIT` command. This exits BULLETIN.

func ActionRead

func ActionRead(cmd *dclish.Command) error

ActionRead handles the `READ` command. Increment (except the first time it's a called in a folder) and reads the message.

This originally existed as the subroutine READ_MSG in bulletin1.for.

func ActionRemove

func ActionRemove(cmd *dclish.Command) error

ActionRemove handles the `REMOVE` command. This modifies a folder.

This originally existed as the subroutine REMOVE_FOLDER in bulletin5.for.

func ActionReply

func ActionReply(cmd *dclish.Command) error

ActionReply handles the `REPLY` command. Used to create a reply to a message.

This originally existed as the subroutine REPLY in bulletin.for.

func ActionRespond

func ActionRespond(_ *dclish.Command) error

ActionRespond handles the `RESPOND` command.

This originally existed as the subroutine RESPOND_MAIL in bulletin2.for.

func ActionSSH

func ActionSSH(cmd *dclish.Command) error

ActionSSH handles the `SSH` command. This prints the help for all the SSH commands. These are used to manage the authorized_keys file. These are new to the Go version of BULLETIN.

func ActionSSHAdd

func ActionSSHAdd(cmd *dclish.Command) error

ActionSSHAdd handles the `SSH ADD` command. This adds a given ssh key to the authorized_keys file for the given user. An admin can add a new public key for another user.

This is new to the Go version of BULLETIN.

func ActionSSHDelete

func ActionSSHDelete(cmd *dclish.Command) error

ActionSSHDelete handles the `SSH DELETE` command. Removes ssh public keys for a user. And admin can specify a different user to remove public keys for.

This is new to the Go version of BULLETIN.

func ActionSSHFetch

func ActionSSHFetch(cmd *dclish.Command) error

ActionSSHFetch handles the `SSH FETCH` command. This command pulls public keys from code sites. It's the quickest way to add a number of keys for a user. An admin can do this for another user.

This is new to the Go version of BULLETIN.

func ActionSSHList

func ActionSSHList(cmd *dclish.Command) error

ActionSSHList handles the `SSH LIST` command. This lists all the public keys for this user. An admin can list public keys for another user.

This is new to the Go version of BULLETIN.

func ActionSearch

func ActionSearch(cmd *dclish.Command) error

ActionSearch handles the `SEARCH` command. This will show all messages matching a search term.

See subtoutines SEARCH and GET_SEARCH in bulletin2.for for the original implementation.

func ActionSeen

func ActionSeen(cmd *dclish.Command) error

ActionSeen handles the `SEEN` command. Marks messages as seen.

This originally existed as... not sure.

func ActionSelect

func ActionSelect(cmd *dclish.Command) error

ActionSelect handles the `SELECT` command. This selects a folder.

This is based on `SELECT_FOLDER` in bulletin5.for.

func ActionSet

func ActionSet(cmd *dclish.Command) error

ActionSet handles the `SET` command. This command has multiple subcommands. This just prints the help you'd see with "HELP SET".

func ActionSetAccess

func ActionSetAccess(cmd *dclish.Command) error

ActionSetAccess handles the `SET ACCESS` command.

This originally existed as the subroutine SET_ACCESS in bulletin5.for.

func ActionSetAlways

func ActionSetAlways(_ *dclish.Command) error

ActionSetAlways handles the `SET ALWAYS` command.

func ActionSetBrief

func ActionSetBrief(cmd *dclish.Command) error

ActionSetBrief handles the `SET BRIEF` command.

func ActionSetDefaultExpire

func ActionSetDefaultExpire(cmd *dclish.Command) error

ActionSetDefaultExpire handles the `SET DEFAULT_EXPIRE` command.

func ActionSetExpireLimit

func ActionSetExpireLimit(cmd *dclish.Command) error

ActionSetExpireLimit handles the `SET EXPIRE_LIMIT` command.

func ActionSetNoPromptExpire

func ActionSetNoPromptExpire(_ *dclish.Command) error

ActionSetNoPromptExpire handles the `SET NOPROMPT_EXPIRE` command.

func ActionSetNoReadNew

func ActionSetNoReadNew(cmd *dclish.Command) error

ActionSetNoReadNew handles the `SET READNEW` command.

func ActionSetNoShowNew

func ActionSetNoShowNew(cmd *dclish.Command) error

ActionSetNoShowNew handles the `SET SHOWNEW` command.

func ActionSetNoaccess

func ActionSetNoaccess(cmd *dclish.Command) error

ActionSetNoaccess handles the `SET ACCESS` command.

This originally existed as the subroutine SET_ACCESS in bulletin5.for.

func ActionSetNoalways

func ActionSetNoalways(_ *dclish.Command) error

ActionSetNoalways handles the `SET NOALWAYS` command.

func ActionSetNobrief

func ActionSetNobrief(cmd *dclish.Command) error

ActionSetNobrief handles the `SET NOBRIEF` command.

func ActionSetNosystem

func ActionSetNosystem(_ *dclish.Command) error

ActionSetNosystem handles the `SET SYSTEM` command.

func ActionSetPromptExpire

func ActionSetPromptExpire(_ *dclish.Command) error

ActionSetPromptExpire handles the `SET PROMPT_EXPIRE` command.

func ActionSetReadNew

func ActionSetReadNew(cmd *dclish.Command) error

ActionSetReadNew handles the `SET READNEW` command.

func ActionSetShowNew

func ActionSetShowNew(cmd *dclish.Command) error

ActionSetShowNew handles the `SET SHOWNEW` command.

func ActionSetSystem

func ActionSetSystem(_ *dclish.Command) error

ActionSetSystem handles the `SET SYSTEM` command.

func ActionShow

func ActionShow(cmd *dclish.Command) error

ActionShow handles the `SHOW` command.

func ActionShowFlags

func ActionShowFlags(_ *dclish.Command) error

ActionShowFlags handles the `SHOW FLAGS` command.

func ActionShowFolder

func ActionShowFolder(cmd *dclish.Command) error

ActionShowFolder handles the `SHOW FOLDER` command. This is based on `SHOW_FOLDER` in bulletin5.for.

func ActionShowNew

func ActionShowNew(_ *dclish.Command) error

ActionShowNew handles the `SHOW NEW` command.

func ActionShowPrivileges

func ActionShowPrivileges(_ *dclish.Command) error

ActionShowPrivileges handles the `SHOW PRIVILEGES` command.

func ActionShowUser

func ActionShowUser(cmd *dclish.Command) error

ActionShowUser handles the `SHOW USER` command.

func ActionShowVersion

func ActionShowVersion(_ *dclish.Command) error

ActionShowVersion handles the `SHOW VERSION` command.

func ActionUnmark

func ActionUnmark(cmd *dclish.Command) error

ActionUnmark handles the `UNMARK` command. This removes a MARK on messages.

This originally existed as... not sure.

func ActionUnseen

func ActionUnseen(cmd *dclish.Command) error

ActionUnseen handles the `UNSEEN` command. Marks messages as unseen.

This originally existed as... not sure.

func ActionUser

func ActionUser(cmd *dclish.Command) error

ActionUser handles the USER command - it prints out help for all the USER subcommands. This is new to the Go version of BULLETIN.

func ActionUserAdd

func ActionUserAdd(cmd *dclish.Command) error

ActionUserAdd handles the `USER ADD` command. This is used to add a new user. This is new to the Go version of BULLETIN.

func ActionUserAdmin

func ActionUserAdmin(cmd *dclish.Command) error

ActionUserAdmin handles the `USER ADMIN` command. This makes the given user an admin. Only the admin can use this command.

This is new to the Go version of BULLETIN.

func ActionUserDelete

func ActionUserDelete(cmd *dclish.Command) error

ActionUserDelete handles the `USER DELETE` command. This will delete the named user. Only the admin can use this command.

This is new to the Go version of BULLETIN.

func ActionUserDisable

func ActionUserDisable(cmd *dclish.Command) error

ActionUserDisable handles the `USER DISABLE` command. This disables a user. Only the admin can use this command.

This is new to the Go version of BULLETIN.

func ActionUserEnable

func ActionUserEnable(cmd *dclish.Command) error

ActionUserEnable handles the `USER ENABLE` command. This enables a user. Only the admin can use this command.

This is new to the Go version of BULLETIN.

func ActionUserList

func ActionUserList(_ *dclish.Command) error

ActionUserList handles the `USER LIST` command. This lists all the users. For now this is limited to only the admin users.

This is new to the Go version of BULLETIN.

func ActionUserMod

func ActionUserMod(cmd *dclish.Command) error

ActionUserMod handles the `USER MOD` command. Makes given the user a moderator. Only the admin can use this command.

This is new to the Go version of BULLETIN.

func ActionUserName

func ActionUserName(cmd *dclish.Command) error

ActionUserName handles the `USER NAME` command. Updates the user's name. Only the admin can use the two argument version of this command.

This is new to the Go version of BULLETIN.

func ActionUserNoadmin

func ActionUserNoadmin(cmd *dclish.Command) error

ActionUserNoadmin handles the `USER NOADMIN` command. This removes the admin bit from a given user. Only the admin can use this command.

This is new to the Go version of BULLETIN.

func ActionUserNomod

func ActionUserNomod(cmd *dclish.Command) error

ActionUserNomod handles the `USER NOMOD` command. Removes the moderator bit from the given user. Only the admin can use this command.

This is new to the Go version of BULLETIN.

func Loop

func Loop() error

Loop is the main event loop.

func ParseDate

func ParseDate(arg string) (time.Time, error)

ParseDate converts a "yyyy-mm-dd" formatted string to time.Time.

func ParseNumberList

func ParseNumberList(input string) ([]int64, error)

ParseNumberList takes a string with a number list like "1,8,3-6,10,20-30" and returns a number list like []int64{1,8,3,4,5,6,10,20,21,...,30}. Well, also an error since somethings can go wrong here.

Types

This section is empty.

Source Files

  • accounts.go
  • args.go
  • command.go
  • folders.go
  • help.go
  • mail.go
  • messages.go
  • misc.go
  • msg-text.go
  • repl.go
  • set.go
  • show.go
  • storage.go
  • xfer.go

Jump to

Keyboard shortcuts

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