routers

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(next bwebframework.HandleFunc, client redis.UniversalClient, prefix string) bwebframework.HandleFunc

func Del

func Del(ctx context.Context, client redis.UniversalClient, key string) error

func HGetAll

func HGetAll(ctx context.Context, client redis.UniversalClient, key string) (map[string]string, error)

func HSet

func HSet(ctx context.Context, client redis.UniversalClient, key string, data map[string]any) error

func MigrateMiddleWare

func MigrateMiddleWare(next bwebframework.HandleFunc, client redis.UniversalClient, prefix string) bwebframework.HandleFunc

func NewRouters

func NewRouters(r *bwebframework.Router, client redis.UniversalClient, x *mongox.MongoX, prefix string, ui Ui) *bwebframework.Router

func QueueInfo

func QueueInfo(ctx context.Context, client redis.UniversalClient, prefix string) (any, error)

func QueueKey

func QueueKey(prefix string) string

func ScheduleQueueKey

func ScheduleQueueKey(prefix string) string

func XRangeN

func XRangeN(ctx context.Context, client redis.UniversalClient, stream string, start, stop string, count int64) ([]redis.XMessage, error)

func XRevRange

func XRevRange(ctx context.Context, client redis.UniversalClient, stream, start, stop string) ([]redis.XMessage, error)

func ZRange

func ZRange(ctx context.Context, client redis.UniversalClient, match string, page, pageSize int64) (map[string]any, error)

func ZRemRangeByScore

func ZRemRangeByScore(ctx context.Context, client redis.UniversalClient, key, min, max string) error

func ZScan

func ZScan(ctx context.Context, client redis.UniversalClient, key string, cursor uint64, match string, count int64) ([]string, uint64, error)

Types

type Client

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

func NewClient

func NewClient(client redis.UniversalClient, prefix string) *Client

func (*Client) List

func (t *Client) List(ctx *bwebframework.BeanContext) error

type Dashboard

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

func NewDashboard

func NewDashboard(client redis.UniversalClient, x *mongox.MongoX, prefix string) *Dashboard

func (*Dashboard) Info

func (t *Dashboard) Info(ctx *bwebframework.BeanContext) error

func (*Dashboard) Nodes

func (t *Dashboard) Nodes(beanContext *bwebframework.BeanContext) error

type Dlq

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

func NewDlq

func NewDlq(client redis.UniversalClient, prefix string) *Dlq

func (*Dlq) List

func (t *Dlq) List(ctx *bwebframework.BeanContext) error

type EventLog

type EventLog struct {
	Id string `json:"id"`
	// contains filtered or unexported fields
}

func NewEventLog

func NewEventLog(client redis.UniversalClient, x *mongox.MongoX, prefix string) *EventLog

func (*EventLog) Delete

func (t *EventLog) Delete(ctx *bwebframework.BeanContext) error

func (*EventLog) Detail

func (t *EventLog) Detail(ctx *bwebframework.BeanContext) error

func (*EventLog) Edit

func (t *EventLog) Edit(ctx *bwebframework.BeanContext) error

func (*EventLog) List

func (t *EventLog) List(ctx *bwebframework.BeanContext) error

func (*EventLog) Retry

func (t *EventLog) Retry(ctx *bwebframework.BeanContext) error

type Index

type Index struct {
}

func NewIndex

func NewIndex() *Index

func (*Index) Home

func (t *Index) Home(ctx *bwebframework.BeanContext) error

type Log

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

func NewLog

func NewLog(client redis.UniversalClient, prefix string) *Log

func (*Log) Add

func (t *Log) Add(w http.ResponseWriter, r *http.Request)

func (*Log) Delete

func (t *Log) Delete(beanContext *bwebframework.BeanContext) error

func (*Log) List

func (t *Log) List(beanContext *bwebframework.BeanContext) error

del ,retry,archive,detail

func (*Log) OptLogs

func (t *Log) OptLogs(beanContext *bwebframework.BeanContext) error

func (*Log) Retry

func (t *Log) Retry(beanContext *bwebframework.BeanContext) error

type Login

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

func NewLogin

func NewLogin(client redis.UniversalClient, prefix string, username, password string, issuer, subject string, expiresAt time.Duration) *Login

func (*Login) GoogleCallBack

func (t *Login) GoogleCallBack(ctx *bwebframework.BeanContext) error

func (*Login) GoogleLogin

func (t *Login) GoogleLogin(ctx *bwebframework.BeanContext) error

func (*Login) Login

func (t *Login) Login(ctx *bwebframework.BeanContext) error

type Logs

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

func NewLogs

func NewLogs(client redis.UniversalClient, prefix string) *Logs

func (*Logs) List

func (t *Logs) List(ctx *bwebframework.BeanContext) error

type Msg

type Msg struct {
	Id      string `json:"id"`
	Level   string
	Info    string
	Payload any `json:"payload"`

	AddTime     string    `json:"addTime"`
	ExpireTime  time.Time `json:"expireTime"`
	RunTime     string    `json:"runTime"`
	BeginTime   time.Time
	EndTime     time.Time
	ExecuteTime time.Time
	Topic       string `json:"topic"`
	Channel     string `json:"channel"`
	Consumer    string `json:"consumer"`
	Score       string
}

type ObjectStruct

type ObjectStruct struct {
	ValueAt          string
	Encoding         string
	RefCount         int
	SerizlizedLength int
	Lru              int
	LruSecondsIdle   int
}

func Object

func Object(ctx context.Context, client redis.UniversalClient, queueName string) (objstr ObjectStruct)

type Queue

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

func NewQueue

func NewQueue(client redis.UniversalClient, prefix string) *Queue

func (*Queue) Detail

func (t *Queue) Detail(ctx *bwebframework.BeanContext) error

func (*Queue) List

func (t *Queue) List(ctx *bwebframework.BeanContext) error

type RedisInfo

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

func NewRedisInfo

func NewRedisInfo(client redis.UniversalClient, prefix string) *RedisInfo

func (*RedisInfo) Info

func (t *RedisInfo) Info(ctx *bwebframework.BeanContext) error

func (*RedisInfo) Monitor

func (t *RedisInfo) Monitor(ctx *bwebframework.BeanContext) error

type Schedule

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

func NewSchedule

func NewSchedule(client redis.UniversalClient, prefix string) *Schedule

func (*Schedule) List

func (t *Schedule) List(bctx *bwebframework.BeanContext) error

type Stream

type Stream struct {
	Prefix   string `json:"prefix"`
	Channel  string `json:"channel"`
	Topic    string `json:"topic"`
	MoodType string `json:"moodType"`
	State    string `json:"state"`
	Size     int    `json:"size"`
	Idle     int    `json:"idle"`
}

type Ui

type Ui struct {
	Account struct {
		UserName string `json:"username"`
		Password string `json:"password"`
	} `json:"account"`
	Issuer    string        `json:"issuer"`
	Subject   string        `json:"subject"`
	JwtKey    string        `json:"jwtKey"`
	ExpiresAt time.Duration `json:"expiresAt"`
}

type User

type User struct {
	Account string `json:"account"`
	// contains filtered or unexported fields
}

func NewUser

func NewUser(client redis.UniversalClient, prefix string) *User

func (*User) Add

func (t *User) Add(ctx *bwebframework.BeanContext) error

func (*User) Delete

func (t *User) Delete(ctx *bwebframework.BeanContext) error

func (*User) Edit

func (t *User) Edit(ctx *bwebframework.BeanContext) error

func (*User) List

func (t *User) List(ctx *bwebframework.BeanContext) error

type UserInfo

type UserInfo struct {
	Account string `json:"account"`
}

Jump to

Keyboard shortcuts

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