api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(c *gin.Context, options ...*Option)

Error Error

func GetMailTypes

func GetMailTypes(c *gin.Context)

func LoadAPIServer

func LoadAPIServer(detached bool)

LoadAPIServer 加载API服务器

func Ok

func Ok(c *gin.Context, options ...*Option)

Ok Ok

func PushMail

func PushMail(c *gin.Context)

Types

type Option

type Option struct {
	Code *int
	Msg  *string
	Data *interface{}
}

func WithCode

func WithCode(code int) *Option

WithCode With Code

func WithData

func WithData(data interface{}) *Option

WithData With Data

func WithMsg

func WithMsg(msg string) *Option

WithMsg With Msg

type PushMailRequest

type PushMailRequest struct {
	SenderName string `json:"sender_name"`
	Subject    string `json:"subject"`
	Type       string `json:"type"`
	Content    string `json:"content"`
	ToMail     string `json:"to_mail"`
}

func (*PushMailRequest) Check

func (p *PushMailRequest) Check() error

Jump to

Keyboard shortcuts

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