cache

package
v0.0.0-...-f664ad0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheConsumer

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

func NewCacheConsumer

func NewCacheConsumer(client sarama.Client, l *zap.Logger, redis redis.Cmdable, local *local.CacheManager, hisCache cache.HistoryCache) *CacheConsumer

func (*CacheConsumer) Consume

func (*CacheConsumer) DeleteKeysWithPattern

func (r *CacheConsumer) DeleteKeysWithPattern(ctx context.Context, pattern string) error

func (*CacheConsumer) Start

func (r *CacheConsumer) Start(_ context.Context) error

type Event

type Event struct {
	Type     string                   `json:"type"`
	Database string                   `json:"database"`
	Table    string                   `json:"table"`
	Data     []map[string]interface{} `json:"data"`
}

type Post

type Post struct {
	ID           uint         `mapstructure:"id"`
	Title        string       `mapstructure:"title"`
	Content      string       `mapstructure:"content"`
	CreatedAt    time.Time    `mapstructure:"created_at"`
	UpdatedAt    time.Time    `mapstructure:"updated_at"`
	DeletedAt    sql.NullTime `mapstructure:"deleted_at"`
	AuthorID     int64        `mapstructure:"author_id"`
	Status       uint8        `mapstructure:"status"`
	PlateID      int64        `mapstructure:"plate_id"`
	Slug         string       `mapstructure:"slug"`
	CategoryID   int64        `mapstructure:"category_id"`
	Tags         string       `mapstructure:"tags"`
	CommentCount int64        `mapstructure:"comment_count"`
}

Jump to

Keyboard shortcuts

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