notifier

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Len

func Len(s string) int

Len return the length of string after serialized. When a string is serialized, the escape character in the string will occupy two bytes because of `\`.

Types

type AccessTokenService

type AccessTokenService struct {
	// contains filtered or unexported fields
}

func GetAccessTokenService

func GetAccessTokenService() *AccessTokenService

func (*AccessTokenService) GetToken

func (ats *AccessTokenService) GetToken(ctx context.Context, key string, getToken func(ctx context.Context) (string, time.Duration, error)) (string, error)

func (*AccessTokenService) InvalidToken

func (ats *AccessTokenService) InvalidToken(ctx context.Context, key string, l log.Logger)

type Notifier

type Notifier interface {
	Notify(ctx context.Context, data template.Data) []error
}

type Template

type Template struct {
	Tmpl *template.Template
	// contains filtered or unexported fields
}

func NewTemplate

func NewTemplate(paths []string) (*Template, error)

func (*Template) Split

func (t *Template) Split(data template.Data, maxSize int, templateName string, subjectTemplateName string, l log.Logger) ([]string, []string, error)

func (*Template) TempleText

func (t *Template) TempleText(name string, data template.Data, l log.Logger) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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