Documentation ¶
Index ¶
- Constants
- Variables
- func CleanPath(p string) (string, error)
- func CleanStaticURL(got string) (unescaped string, err error)
- func CleanURL(got string) (string, error)
- func CodeBlock(in string) string
- func FindDir(dir string) (string, bool)
- func GetLocale(mm *pluginapi.Client, config *model.Config, userID string) string
- func GetLocaleWithUser(config *model.Config, user *model.User) string
- func JSONBlock(in interface{}) string
- func LastN(s string, n int) string
- func LoadSession(mm *pluginapi.Client, sessionID, actingUserID string) (*model.Session, error)
- func LogDigest(i interface{}) string
- func NewAlreadyExistsError(args ...interface{}) error
- func NewError(source error, args ...interface{}) error
- func NewForbiddenError(args ...interface{}) error
- func NewInvalidError(args ...interface{}) error
- func NewNotFoundError(args ...interface{}) error
- func NewUnauthorizedError(args ...interface{}) error
- func Pretty(in interface{}) string
- func Remarshal(dst, src interface{})
- func ToJSON(in interface{}) string
- type ByteSize
- type HasLoggable
- type LocError
- type LogConfig
- type LogConfigGetter
- type Logger
- type NilLogger
- func (NilLogger) Debugf(string, ...interface{})
- func (NilLogger) Debugw(string, ...interface{})
- func (NilLogger) Errorf(string, ...interface{})
- func (NilLogger) Errorw(string, ...interface{})
- func (NilLogger) Fatalf(string, ...interface{})
- func (NilLogger) Fatalw(string, ...interface{})
- func (NilLogger) Infof(string, ...interface{})
- func (NilLogger) Infow(string, ...interface{})
- func (NilLogger) Warnf(string, ...interface{})
- func (NilLogger) Warnw(string, ...interface{})
- func (l NilLogger) With(args ...interface{}) Logger
- func (l NilLogger) WithError(error) Logger
Constants ¶
View Source
const ErrorKey = "error"
Variables ¶
View Source
var ErrAlreadyExists = errors.New("already exists")
View Source
var ErrForbidden = errors.New("forbidden")
View Source
var ErrInvalid = errors.New("invalid input")
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func CleanStaticURL ¶ added in v1.2.0
func FindDir ¶
FindDir looks for the given directory in nearby ancestors relative to the current working directory as well as the directory of the executable, falling back to `./` if not found.
func GetLocaleWithUser ¶ added in v1.0.0
func LoadSession ¶
func NewAlreadyExistsError ¶
func NewAlreadyExistsError(args ...interface{}) error
func NewForbiddenError ¶
func NewForbiddenError(args ...interface{}) error
func NewInvalidError ¶
func NewInvalidError(args ...interface{}) error
func NewNotFoundError ¶
func NewNotFoundError(args ...interface{}) error
func NewUnauthorizedError ¶
func NewUnauthorizedError(args ...interface{}) error
Types ¶
type HasLoggable ¶ added in v1.1.0
type HasLoggable interface {
Loggable() []interface{}
}
type LocError ¶ added in v1.0.0
type LocError []*i18n.LocalizeConfig
func NewLocError ¶ added in v1.0.0
func NewLocError(err *i18n.LocalizeConfig) LocError
type LogConfigGetter ¶ added in v1.2.0
type LogConfigGetter interface {
GetLogConfig() LogConfig
}
type Logger ¶ added in v1.0.0
type Logger interface { // from zap.SugaredLogger Debugf(template string, args ...interface{}) Debugw(msg string, keysAndValues ...interface{}) Warnf(template string, args ...interface{}) Warnw(msg string, keysAndValues ...interface{}) Infof(template string, args ...interface{}) Infow(msg string, keysAndValues ...interface{}) Errorf(template string, args ...interface{}) Errorw(msg string, keysAndValues ...interface{}) Fatalf(template string, args ...interface{}) Fatalw(msg string, keysAndValues ...interface{}) // implemented here to provide a consistent interface, without using // *zap.SugaredLogger WithError(error) Logger With(args ...interface{}) Logger }
func MustMakeCommandLogger ¶ added in v1.0.0
func NewPluginLogger ¶ added in v1.0.0
func NewPluginLogger(mmapi *pluginapi.Client, confGetter LogConfigGetter) Logger
func NewTestLogger ¶ added in v1.0.0
func NewTestLogger() Logger
Source Files ¶
Click to show internal directories.
Click to hide internal directories.