module_model

package
v0.0.0-...-6dc645d Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageTemplate

type MessageTemplate struct {
	GatewayName  string `eru:"required"`
	TemplateType string `eru:"required"`
	TemplateName string
	TemplateId   string `eru:"required"`
	TemplateText string `eru:"required"`
}
type SmsGateway struct {
	GatewayName   string `eru:"required"`
	GatewayUrl    string `eru:"required"`
	GatewayMethod string `eru:"required"`
	Allocation    int    `eru:"required"`
}
type EmailGateway struct {
	GatewayName   string `eru:"required"`
	GatewayUrl    string `eru:"required"`
	GatewayMethod string `eru:"required"`
	Allocation    int    `eru:"required"`
}

func (*MessageTemplate) GetMessageText

func (mt *MessageTemplate) GetMessageText(vars string) string

type ModuleProjectI

type ModuleProjectI interface {
	AddGateway(ctx context.Context, gatewayObj gateway.GatewayI)
	AddAuth(ctx context.Context, authObj auth.AuthI)
	RemoveAuth(ctx context.Context, authType string) error
	CompareProject(ctx context.Context, compareProject Project) (StoreCompare, error)
}

type Project

type Project struct {
	ProjectId        string `eru:"required"`
	Gateways         map[string]gateway.GatewayI
	MessageTemplates map[string]MessageTemplate
	Auth             map[string]auth.AuthI
}

func (*Project) AddAuth

func (prj *Project) AddAuth(ctx context.Context, authType string, authObjI auth.AuthI) error

func (*Project) AddGateway

func (prj *Project) AddGateway(ctx context.Context, gatewayObjI gateway.GatewayI) error

func (*Project) CompareProject

func (prj *Project) CompareProject(ctx context.Context, compareProject Project) (StoreCompare, error)

func (*Project) RemoveAuth

func (prj *Project) RemoveAuth(ctx context.Context, authType string) error

type StoreCompare

type StoreCompare struct {
	DeleteAuth   []string
	NewAuth      []string
	MismatchAuth map[string]interface{}
}

Jump to

Keyboard shortcuts

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