internal

package
v0.0.0-...-f190048 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Error = log.New(os.Stdout, "\u001b[31mERROR: \u001b[0m", log.LstdFlags|log.Lshortfile)

Functions

func GenerateShortUrl

func GenerateShortUrl(longUrl string, particleTableName string) (*string, error)

func JoinUrl

func JoinUrl(baseUrl string, endpoint string) (string, error)

Types

type Config

type Config struct {
	EntriesTableName        string
	ParticlesTableName      string
	BaseEndpoint            string
	ApiHandler              string
	DefaultRedirectEndpoint string
}

func LoadConfig

func LoadConfig() (*Config, error)

type Item

type Item struct {
	ShortUrl string `json:"short_url" dynamodbav:"short_url"`
	LongUrl  string `json:"long_url" dynamodbav:"long_url"`
}

func GetLongUrl

func GetLongUrl(tableName string, shortUrl string) (*Item, error)

type ParticleEntry

type ParticleEntry struct {
	Particle string `json:"particle" dynamodbav:"particle"`
}

Directories

Path Synopsis
handlers
gin

Jump to

Keyboard shortcuts

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