internal

package
v0.0.0-...-7bcc2f9 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLink(appData AppData)
func DeleteLink(appData AppData)
func ExpandLink(appData AppData)

func GetAll

func GetAll(appData AppData)

func GetConfig

func GetConfig(appData AppData)

Types

type AppData

type AppData struct {
	Config     Config
	Subcommand string
	Input1     string
	Input2     string
	Input3     string
}

func ParseData

func ParseData() AppData

type BackendConfig

type BackendConfig struct {
	Version        string `json:"version"`
	SiteURL        string `json:"site_url"`
	CapitalLetters bool   `json:"allow_capital_letters"`
	PublicMode     bool   `json:"public_mode"`
	PMExpiryDelay  int64  `json:"public_mode_expiry_delay"`
	SlugStyle      string `json:"slug_style"`
	SlugLength     int64  `json:"slug_length"`
	TryLongerSlug  bool   `json:"try_longer_slug"`
}

type Config

type Config struct {
	URL      string `json:"url"`
	APIKey   string `json:"apiKey"`
	Password string `json:"password"`
}

type ExpandedURL

type ExpandedURL struct {
	ShortURL   string `json:"shorturl,omitempty"`
	LongURL    string `json:"longurl,omitempty"`
	Hits       int64  `json:"hits,omitempty"`
	ExpiryTime int64  `json:"expiry_time"`
}

type JSONError

type JSONError struct {
	Reason string `json:"reason"`
}

type URLEntry

type URLEntry struct {
	ShortURL   string `json:"shortlink"`
	LongURL    string `json:"longlink"`
	Hits       int64  `json:"hits"`
	ExpiryTime int64  `json:"expiry_time"`
}

Jump to

Keyboard shortcuts

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