api

package
v0.0.0-...-8293e18 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewAdmin)

Functions

This section is empty.

Types

type Admin

type Admin interface {
	CreateTemplate(ctx context.Context, req *CreateTemplateReq) (*CreateTemplateReply, error)
	ListTemplate(ctx context.Context, req *ListTemplateReq) (*ListTemplateReply, error)
	ListRecord(ctx context.Context, req *ListRecordReq) (*ListRecordReply, error)
}

func NewAdmin

func NewAdmin(log *zap.SugaredLogger, tempUC *service.TemplateUseCase, recordUC *service.RecordUseCase) (Admin, error)

type CreateTemplateReply

type CreateTemplateReply struct {
	Id string `json:"id"`
}

type CreateTemplateReq

type CreateTemplateReq struct {
	Name    string `json:"name"`
	Subject string `json:"subject"`
	Content string `json:"content"`
}

type ListRecordReply

type ListRecordReply struct {
	List []*RecordReply `json:"list"`
}

type ListRecordReq

type ListRecordReq struct {
	TemplateId string `json:"template_id" form:"template_id"`
	Name       string `json:"name" form:"name"`
	IsSuccess  *int   `json:"is_success" form:"is_success"`
	PageNum    int    `json:"page_num" form:"page_num"`
	PageSize   int    `json:"page_size" form:"page_size"`
}

type ListTemplateReply

type ListTemplateReply struct {
	List []*TemplateReply `json:"list"`
}

type ListTemplateReq

type ListTemplateReq struct {
	Id       string `json:"id" form:"id"`
	Name     string `json:"name" form:"name"`
	PageNum  int    `json:"page_num" form:"page_num"`
	PageSize int    `json:"page_size" form:"page_size"`
}

type RecordReply

type RecordReply struct {
	Id         string   `json:"id"`
	SendTime   int64    `json:"send_time"`
	Receivers  []string `json:"receivers"`
	TemplateId string   `json:"template_id"`
	Name       string   `json:"name"`
	Content    string   `json:"content"`
	IsSuccess  int8     `json:"is_success"`
	Message    string   `json:"message"`
}

type TemplateReply

type TemplateReply struct {
	Id      string `json:"id"`
	Name    string `json:"name"`
	Subject string `json:"subject"`
	Content string `json:"content"`
}

Jump to

Keyboard shortcuts

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