core

package
v0.0.0-...-cba2ebf Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const DomainFilelock = "D.lock"
View Source
const UsersFilename = "U"
View Source
const UsersFilesign = "U.sign"

Variables

View Source
var ClockOffset time.Duration
View Source
var ErrInvalidChangeFilePath = fmt.Errorf("a change file is not in a valid Safepool folder")
View Source
var ErrInvalidFilePath = fmt.Errorf("a file is not in a valid Safepool folder")
View Source
var ErrInvalidId = fmt.Errorf("the id is invalid")
View Source
var ErrInvalidSignature = fmt.Errorf("signature does not match the user id")
View Source
var ErrInvalidSize = fmt.Errorf("provided slice has not enough data")
View Source
var ErrInvalidVersion = fmt.Errorf("version of protocol is not compatible")
View Source
var ErrNoDriver = fmt.Errorf("no driver found for the provided configuration")
View Source
var ErrNoExchange = fmt.Errorf("no exchange reachable for the domain")
View Source
var ErrNotAuthorized = fmt.Errorf("user is not authorized in the domain")
View Source
var ErrNotInitialized = fmt.Errorf("safepool not initialized")
View Source
var NtpRetries = 10
View Source
var NtpServers = []string{
	"time.google.com",
	"0.beevik-ntp.pool.ntp.org",
}
View Source
var SnowFlakeStart = time.Date(2023, 1, 1, 0, 0, 0, 0, time.UTC)

Functions

func Debug

func Debug(format string, args ...any)

func FatalIf

func FatalIf(err error, msg string, args ...interface{})

func Info

func Info(format string, args ...any)

func IsErr

func IsErr(err error, msg string, args ...interface{}) bool

func Now

func Now() time.Time

func ReadBytes

func ReadBytes(r io.Reader) ([]byte, error)

func Since

func Since(t time.Time) time.Duration

func WriteBytes

func WriteBytes(data []byte, w io.Writer) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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