api

package
v0.0.0-...-2f9fade Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InvalidEmail

func InvalidEmail(email string) bool

Must be between 6 and 30 characters

func InvalidFilename

func InvalidFilename(name string) bool

Must be 1-100 in length

func InvalidNickname

func InvalidNickname(nick string) bool

Must be:

  • 3-10 in length
  • No special characters

func InvalidPassword

func InvalidPassword(password string) bool

Types

type AdvancedResponse

type AdvancedResponse struct {
	Code   int                 `json:"code"`
	Count  int                 `json:"count"`
	Data   any                 `json:"data"`
	Writer http.ResponseWriter `json:"-"`
}

func (*AdvancedResponse) JSON

func (s *AdvancedResponse) JSON()

type SimpleResponse

type SimpleResponse struct {
	Code    int                 `json:"code"`
	Message string              `json:"message"`
	Writer  http.ResponseWriter `json:"-"`
}

func (*SimpleResponse) BadRequest

func (s *SimpleResponse) BadRequest(msg string)

Dev only message

func (*SimpleResponse) Conflict

func (s *SimpleResponse) Conflict(msg string)

func (*SimpleResponse) InternalError

func (s *SimpleResponse) InternalError()

No message

func (*SimpleResponse) JSON

func (s *SimpleResponse) JSON()

func (*SimpleResponse) NotFound

func (s *SimpleResponse) NotFound(msg string)

Message required!

func (*SimpleResponse) Success

func (s *SimpleResponse) Success(msg string)

func (*SimpleResponse) Unauthorized

func (s *SimpleResponse) Unauthorized(msg string)

Jump to

Keyboard shortcuts

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