Documentation
¶
Index ¶
- type PostService
- func (p *PostService) CreateTemplate(ctx context.Context, template *template.Template) (int64, error)
- func (p *PostService) GetTemplateById(ctx context.Context, id int64) (*template.Template, error)
- func (p *PostService) ListTemplate(ctx context.Context, pageRequest *api.PaginationRequest, ...) ([]*template.Template, error)
- func (p *PostService) RemoveTemplate(ctx context.Context, id int64) error
- func (p *PostService) Send(ctx context.Context, sendType api.PostType, to, title, content string) error
- func (p *PostService) SendWithTemplate(ctx context.Context, sendType api.PostType, template *template.Template, ...) error
- func (p *PostService) UpdateTemplate(ctx context.Context, template *template.Template) error
- type StringField
- type TemplateSearchField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostService ¶
type PostService struct {
// contains filtered or unexported fields
}
func New ¶
func New(templateRepo repoiface.TemplateRepository, thirdMsgSendService repoiface.ThirdMessageSendService) *PostService
func (*PostService) CreateTemplate ¶
func (*PostService) GetTemplateById ¶
func (*PostService) ListTemplate ¶
func (p *PostService) ListTemplate(ctx context.Context, pageRequest *api.PaginationRequest, searchFields ...*api.SearchField) ([]*template.Template, error)
func (*PostService) RemoveTemplate ¶
func (p *PostService) RemoveTemplate(ctx context.Context, id int64) error
func (*PostService) SendWithTemplate ¶
func (*PostService) UpdateTemplate ¶
type StringField ¶
type StringField interface { Eq(value string) field.Expr Neq(value string) field.Expr Gt(value string) field.Expr Gte(value string) field.Expr Lt(value string) field.Expr Lte(value string) field.Expr In(values ...string) field.Expr NotIn(values ...string) field.Expr Between(min, max string) field.Expr NotBetween(min, max string) field.Expr Like(value string) field.Expr NotLike(value string) field.Expr }
type TemplateSearchField ¶
type TemplateSearchField struct { Field StringField FieldName string Operator api.SearchOperator }
func NewTemplateSearchFiled ¶
func NewTemplateSearchFiled(field StringField, fieldName string, operator api.SearchOperator) *TemplateSearchField
func (*TemplateSearchField) ToGormCondition ¶
func (t *TemplateSearchField) ToGormCondition(value string) (gen.Condition, error)
Click to show internal directories.
Click to hide internal directories.