log

package
v1.17.4 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package log provides logging tools for bot.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

func WrapContext

func WrapContext(base types.Context, log zerolog.Logger) *Context

func (*Context) Check

func (c *Context) Check(ctx ctx.Context, val string) (bool, error)

func (*Context) Reset

func (c *Context) Reset(ctx ctx.Context) error

func (*Context) Set

func (c *Context) Set(ctx ctx.Context, val string) error

type ContextProvider

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

func WrapContextProvider

func WrapContextProvider(base types.ContextProvider, log zerolog.Logger) *ContextProvider

func (*ContextProvider) UserContext

func (c *ContextProvider) UserContext(chatID types.ChatID) types.Context

type StateProvider

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

func WrapStateProvider

func WrapStateProvider(base types.StateProvider, log zerolog.Logger) *StateProvider

func (*StateProvider) Load

func (s *StateProvider) Load(ctx context.Context, chatID types.ChatID, state types.State) error

func (*StateProvider) Update

func (s *StateProvider) Update(ctx context.Context, chatID types.ChatID, state types.State) error

Jump to

Keyboard shortcuts

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