slug

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateSlug

func ValidateSlug(slug string) error

Types

type CompositeSlug

type CompositeSlug struct {
	OrgSlug     string
	ProjectSlug string
}

func BuildCompositeSlug

func BuildCompositeSlug(orgSlug, projectSlug string) (CompositeSlug, error)

func ParseCompositeSlug

func ParseCompositeSlug(compositeSlug string) (CompositeSlug, error)

ParseCompositeSlug parses a composite slug in the format "org-slug/project-slug" Returns an error if the format is invalid or slugs don't match the pattern

func ResolveProjectSlug added in v0.4.0

func ResolveProjectSlug(input string, defaultOrgSlug string) (CompositeSlug, error)

ResolveProjectSlug resolves a project identifier that could be: 1. A composite slug: "org-slug/project-slug" 2. A project slug only: "project-slug" (requires default org context) Returns the resolved composite slug or an error

func (CompositeSlug) IsEmpty

func (cs CompositeSlug) IsEmpty() bool

func (CompositeSlug) String

func (cs CompositeSlug) String() string

Jump to

Keyboard shortcuts

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