event

package
v0.0.0-...-2ba808a Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrMsgFmtEN       = "We got a failed process due to %s error, please check it.%s"
	ErrMsgSecomEN     = "SECOM"
	ErrMsgSendGridEN  = "SendGrid’s"
	ErrMsgPDFFormatEN = "PDF format"
	ErrMsgOthersEN    = "some"
	ErrMsgSecomJP     = "下記事業者にて締結処理に失敗した書類が発生しています。"
	ErrMsgSendGridJP  = "" /* 179-byte string literal not displayed */
	ErrMsgPDFFormatJP = "" /* 191-byte string literal not displayed */
	ErrMsgOthersJP    = "" /* 287-byte string literal not displayed */
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	WebhookURL string `yaml:"webhook_url"`
	Name       string `yaml:"name"`
	Envs       string `yaml:"envs"`
}

type ConclusionJobErrType

type ConclusionJobErrType string
var (
	ErrTypeSecomFailure     ConclusionJobErrType = "secom_failure"
	ErrTypeSendGridIssue    ConclusionJobErrType = "sendGrid_issue"
	ErrTypeInvalidPDFFormat ConclusionJobErrType = "invalid_pdf_format"
	ErrTypeOthers           ConclusionJobErrType = "others"
)

type Event

type Event interface {
	Name() Name
	Channels() []Channel
	BuildMessage(payload map[string]interface{}) string
	Env() string
}

Event provides methods to handle a notification event

func NewEventCreateOfficeUsage

func NewEventCreateOfficeUsage(env, messageTemplate string, channels []Channel) Event

NewEventCreateOfficeUsage return an instance of Event interface

func NewEventDeleteOffice

func NewEventDeleteOffice(env, messageTemplate string, channels []Channel) Event

NewEventDeleteOffice returns an instance of Event interface

func NewEventFailConclusionJob

func NewEventFailConclusionJob(env, messageTemplate string, channels []Channel) Event

func NewEventFailMFCBoxJob

func NewEventFailMFCBoxJob(env, messageTemplate string, channels []Channel) Event

func NewEventForcefullyAddUser

func NewEventForcefullyAddUser(env, messageTemplate string, channels []Channel) Event

NewEventForcefullyAddUser returns an instance of Event interface

func NewEventInternalUserAdd

func NewEventInternalUserAdd(env, messageTemplate string, channels []Channel) Event

NewEventInternalUserAdd returns an instance of Event interface

func NewEventInternalUserLogin

func NewEventInternalUserLogin(env, messageTemplate string, channels []Channel) Event

NewEventInternalUserLogin returns an instance of Event interface

func NewEventInternalUserUpdateRole

func NewEventInternalUserUpdateRole(env, messageTemplate string, channels []Channel) Event

NewEventInternalUserUpdateRole returns an instance of Event interface

func NewEventProxyLogin

func NewEventProxyLogin(env, messageTemplate string, channels []Channel) Event

NewEventProxyLogin returns an instance of Event interface

func NewEventTurnOffLegalCheck

func NewEventTurnOffLegalCheck(env, messageTemplate string, channels []Channel) Event

NewEventTurnOffLegalCheck returns an instance of Event interface

func NewEventUpdateUserSetting

func NewEventUpdateUserSetting(env, messageTemplate string, channels []Channel) Event

NewEventUpdateUserSetting return an instance of Event interface

type Name

type Name int

Name is the enum of event types

const (
	// event name iota value
	EventNameInternalUserLogin Name = iota + 1
	EventNameInternalUserAdd
	EventNameInternalUserUpdateRole
	EventNameDeleteOffice
	EventNameForcefullyAddUser
	EventNameCreateOfficeUsage
	EventNameUpdateUserSetting
	EventNameFailConclusionJob
	EventNameFailMFCBoxJob
	EventNameProxyLogin
	EventNameTurnOffLegalCheck
)

func (Name) String

func (e Name) String() string

String return a string value of event name

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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