Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var TenderCodeRegex = regexp.MustCompile(`\d{4}-[A-Z0-9]+-[A-Z0-9]+`)
Functions ¶
func EncryptByRSA ¶ added in v1.4.1
headerValue := fmt.Sprintf("%s%s$$%d", baseURL, endpoint, time.Now().UnixMilli()) encryptedHeader, err := encryptByRSA(headerValue) if err != nil { return fmt.Errorf("encryption error: %w", err) }
// Create new request url := baseURL + endpoint + data req, err := http.NewRequest("GET", url, nil) if err != nil { return fmt.Errorf("failed to create request: %w", err) }
// Set headers req.Header.Set("nsssjss", encryptedHeader) req.Header.Set("Content-Type", "application/json; charset=utf-8")
func EscapeMarkdown ¶
EscapeMarkdown In all other places characters '_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!' must be escaped with the preceding character '\'. In all other places characters '_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!' must be escaped with the preceding character '\'.
func NewTablePlugin ¶ added in v1.4.3
func SimplifyContent ¶ added in v1.4.2
func SimplifyHTML ¶ added in v1.4.1
Types ¶
type Config ¶
type Config struct {
// Enable console logging
ConsoleLoggingEnabled bool
// EncodeLogsAsJson makes the log framework log JSON
EncodeLogsAsJson bool
// FileLoggingEnabled makes the framework log to a file
// the fields below can be skipped if this value is false!
FileLoggingEnabled bool
// Directory to log to when file logging is enabled
Directory string
// Filename is the name of the logfile which will be placed inside the directory
Filename string
// MaxSize the max size in MB of the logfile before it's rolled
MaxSize int
// MaxBackups the max number of rolled files to keep
MaxBackups int
// MaxAge the max age in days to keep a logfile
MaxAge int
LogLevel zerolog.Level
}
Config for logging
type TablePlugin ¶ added in v1.4.3
type TablePlugin struct{}
func (*TablePlugin) Init ¶ added in v1.4.3
func (p *TablePlugin) Init(conv *converter.Converter) error
func (*TablePlugin) Name ¶ added in v1.4.3
func (p *TablePlugin) Name() string