auth

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetToken

func GetToken() (string, error)

GetToken returns the stored PAT token string

func NewAuthCmd

func NewAuthCmd() *cobra.Command

NewAuthCmd creates the auth command

func NewLoginCmd

func NewLoginCmd() *cobra.Command

NewLoginCmd creates the login command (added to root)

func NewLogoutCmd

func NewLogoutCmd() *cobra.Command

NewLogoutCmd creates the logout command (added to root)

Types

type AuthStatusResponse

type AuthStatusResponse struct {
	LoggedIn  bool   `json:"logged_in"`
	Token     string `json:"token,omitempty"`
	CreatedAt string `json:"created_at,omitempty"`
	ExpiresAt string `json:"expires_at,omitempty"`
	Expired   bool   `json:"expired,omitempty"`
}

AuthStatusResponse represents the JSON response for auth status

type TokenConfig

type TokenConfig struct {
	Token     string    `json:"token"`
	CreatedAt time.Time `json:"created_at"`
	ExpiresAt time.Time `json:"expires_at,omitempty"`
}

TokenConfig represents the stored PAT token

func LoadToken

func LoadToken() (*TokenConfig, error)

LoadToken loads the stored PAT token

Jump to

Keyboard shortcuts

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