Categorygithub.com/RiiConnect24/Mail-Go
modulepackage
0.0.0-20230218171713-ce7380d009d2
Repository: https://github.com/riiconnect24/mail-go.git
Documentation: pkg.go.dev

# README

Mail-Go

License Production List Go Report Card

This is an effort to rewrite Wii Mail legacy PHP scripts into golang. Some reasons why:

  • apache2 has the fun tendency to go overboard on memory usage.
  • go is fun.

How to develop

The source is entirely here, with each individual cgi component in their own file. A Dockerfile is available to create an image. You can use docker-compose.yml to develop on this specific component with its own mysql, or use something that doesn't yet exist to develop on RC24 as a whole. You can use docker-compose up to start up both MariaDB and Mail-Go.

How can I use the patcher for my own usage?

You're welcome to POST /patch with a nwc24msg.cfg under form key uploaded_config.

What should I do if I'm adding a new dependency?

We use Go's 1.11+ module feature. Make sure you have this enabled. For more information, see the Go wiki.

Credits

Thanks to Disconnect24 contributors that wrote the code, currently under a forked repo.

# Functions

No description provided by the author
Check handles adding the proper interval for check.cgi along with future challenge solving and future mail existence checking.
Delete handles delete requests of mail.
No description provided by the author
No description provided by the author
GenerateBoundary returns a string with the format Nintendo used for boundaries.
GenMailErrorCode formulates a proper response needed for mail-specific errors.
GenNormalErrorCode formulates a proper response for overall errors.
GenSuccessResponse returns a successful message, using = as the divider between characters.
GenSuccessResponseTyped returns a successful message, using the specified character as a divider.
No description provided by the author
ModifyNwcConfig takes an original config, applies needed patches to the URL and such, updates the checksum and returns either nil, error or a patched config w/o error.
RandStringBytesMaskImprSrc makes a random string with the specified size.
Receive loops through stored mail and formulates a response.
Send takes POSTed mail by the Wii and stores it in the database for future usage.

# Constants

No description provided by the author

# Variables

No description provided by the author
No description provided by the author
MailCheckKey is used as the basis of the SHA-1 HMAC performed for the challenge.

# Structs

Config structure for `config.json`.
No description provided by the author