db

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: LGPL-2.1 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeliverStrategy_DELIVER_IMMEDIATELY = deliverStrategy("DELIVER_IMMEDIATELY")
	DeliverStrategy_STAGING             = deliverStrategy("STAGING")

	MailState_STAGING         = mailState("STAGING")
	MailState_DELIVER_SUCCESS = mailState("DELIVER_SUCCESS")
	MailState_DELIVER_FAILED  = mailState("DELIVER_FAILED")

	ReceiverType_To  = receiverType("To")
	ReceiverType_Cc  = receiverType("Cc")
	ReceiverType_Bcc = receiverType("Bcc")
)

Variables

This section is empty.

Functions

func DeliverStrategy

func DeliverStrategy(name string) deliverStrategy

func MailState

func MailState(name string) mailState

func NewClient

func NewClient() (*xorm.Engine, error)

func ReceiverType

func ReceiverType(name string) receiverType

Types

type Dialer

type Dialer struct {
	Id         int64
	InsertTime time.Time `xorm:"created"`

	UserId int64

	Host         string
	Port         int
	AuthUsername string
	AuthPassword string

	Name string
}

type Endpoint

type Endpoint struct {
	Id         int64
	InsertTime time.Time `xorm:"created"`

	UserAppId  int64
	DialerId   int64
	TemplateId int64
	UserId     int64

	Name string
	Key  string
}

type EndpointPreference

type EndpointPreference struct {
	Id         int64
	InsertTime time.Time `xorm:"created"`

	EndpointId int64

	DeliverStrategy string
	EnableReCaptcha int32 // 1 enable 2 disable
	SuccessRedirect string
	FailRedirect    string
}

type Mail

type Mail struct {
	Id         int64
	InsertTime time.Time `xorm:"created"`

	EndpointId   int64
	State        string
	DeliveryTime Time
	Content      string
	Raw          string
}

type Receiver

type Receiver struct {
	Id         int64
	InsertTime time.Time `xorm:"created"`

	EndpointId int64
	UserId     int64
	UserAppId  int64

	Address      string
	ReceiverType string
}

type Template

type Template struct {
	Id         int64
	InsertTime time.Time `xorm:"created"`

	UserId int64

	Template    string
	ContentType string
}

type Time

type Time time.Time

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

type User

type User struct {
	Id         int64
	InsertTime time.Time `xorm:"created"`

	Username string
	Password string
}

type UserApp

type UserApp struct {
	Id         int64
	InsertTime time.Time `xorm:"created"`

	UserId int64

	Name string
	Host string
}

Jump to

Keyboard shortcuts

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