Documentation ¶
Index ¶
- Constants
- Variables
- func CalculateDaysLeft(expiry time.Time) int
- func CreateConfig(configFolder, configFile string) error
- func Delete[T any](l []T, i int) []T
- func DeleteFromConfig(domain, path string) error
- func DialDomains(ssls *[]ssl, domains []string)
- func ExtractField(ssls []ssl, f string) []string
- func ExtractHost(rawUrl string) string
- func FileExists(path string) bool
- func Find[T comparable](l []T, v T) int
- func GetConfigPath(folder, file string) string
- func GetInfo(domain string, ch chan chDailRes)
- func GetSavedDomains(path string) ([]string, error)
- func InitEntry(ssls []ssl) *entry
- func InitProject(st State) (tea.Model, tea.Cmd)
- func RenderDaysLeft(daysLeft int) string
- func Sanitize(raw string) string
- func SaveDomain(domain, path string) error
- type State
Constants ¶
View Source
const ( MARGIN = 2 PADDING = 1 COLOR_PINK = lipgloss.Color("#E95678") COLOR_PINK_2 = lipgloss.Color("#bd5970") COLOR_GRAY_1 = lipgloss.Color("#E3E4DB") COLOR_GRAY_2 = lipgloss.Color("#CDCDCD") COLOR_GRAY_3 = lipgloss.Color("#B8BABA") COLOR_GRAY_4 = lipgloss.Color("#626262") COLOR_DARK_GREEN = lipgloss.Color("#57886C") SOPHISTICATED = lipgloss.Color("#abb2bf") )
Variables ¶
View Source
var (
DocStyle = lipgloss.NewStyle().Margin(0, 2)
)
View Source
var ( // WindowSize store the size of the terminal window WindowSize tea.WindowSizeMsg )
Functions ¶
func CalculateDaysLeft ¶ added in v0.1.2
CalculateDaysLeft returns the number of days left until expiry
func CreateConfig ¶
CreateConfig creates a config file with dummy content
func DeleteFromConfig ¶
DeleteDomain remove domain from config file
func ExtractField ¶
ExtractField returns a slice of values for a given field
func ExtractHost ¶
ExtractHost returns the host from a given url
func FileExists ¶
FileExists checks if a file exists at the given path
func Find ¶
func Find[T comparable](l []T, v T) int
Find returns the index of the first instance of value in slice or -1 if value is not present in slice
func GetConfigPath ¶
GetConfigPath returns the path to the config file
func GetInfo ¶
func GetInfo(domain string, ch chan chDailRes)
GetInfo returns the ssl info for a given domain
func GetSavedDomains ¶
func RenderDaysLeft ¶ added in v0.1.2
func SaveDomain ¶
SaveDomain saves a new domain to the config file.
Types ¶
Click to show internal directories.
Click to hide internal directories.