db_base

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShortLink struct {
	Type          common.ShortLinkType
	ShortLinkPath string
	RawLink       string
	ExpireTime    time.Time
	CreateTime    time.Time
	UpdateTime    time.Time
}

type ShortLinkDbInterface

type ShortLinkDbInterface interface {
	GenShortLink(ctx context.Context, rawLink string) (*ShortLink, error)
	GenShortLinkWithExpire(ctx context.Context, rawLink string, expireAt time.Time) (*ShortLink, error)
	GetByShortLinkPath(ctx context.Context, shortLinkPath string) (*ShortLink, error)
	GetByRawLink(ctx context.Context, rawLink string) (*ShortLink, error)
	SetShortLinkExpire(ctx context.Context, shorLinkPath string, expireAt time.Time) error
	DeleteShortLink(ctx context.Context, shortLinkPath string) error
}

Jump to

Keyboard shortcuts

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