shift

package
v0.0.0-...-1369677 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// INDEX 61 用于截取索引数
	INDEX = 0x0000003D
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ShortUrlBase

type ShortUrlBase struct {
	StrLen   int    // 生成短地址标识长度
	Shift    int64  // 右移移位数
	Alphabet []byte // 对应进制数字符表
}

ShortUrlBase 短地址生成对象

func NewShortUrlBase

func NewShortUrlBase(shift, strLen int64, alphabet string) ShortUrlBase

NewShortUrlBase 新建短地址创建对象

func (ShortUrlBase) Generator

func (s ShortUrlBase) Generator(longURL string) string

Generator 生成短地址

Jump to

Keyboard shortcuts

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