config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() (string, error)

func Save

func Save(cfg *Config) error

Types

type AuthMethod

type AuthMethod string

AuthMethod indicates how the user authenticated.

const (
	AuthMethodAPIKey  AuthMethod = "api_key"
	AuthMethodSession AuthMethod = "session"
)

type Config

type Config struct {
	AuthMethod AuthMethod `json:"auth_method"`

	// API Key auth (App Store Connect API)
	KeyID          string `json:"key_id,omitempty"`
	IssuerID       string `json:"issuer_id,omitempty"`
	PrivateKeyPath string `json:"private_key_path,omitempty"`

	// Session auth (Apple ID)
	Session *SessionConfig `json:"session,omitempty"`
}

func Load

func Load() (*Config, error)

func (*Config) IsValid

func (c *Config) IsValid() bool

IsValid checks if the config has usable credentials.

type SerializedCookie

type SerializedCookie struct {
	Name   string `json:"name"`
	Value  string `json:"value"`
	Domain string `json:"domain"`
	Path   string `json:"path"`
}

type SessionConfig

type SessionConfig struct {
	AppleID    string              `json:"apple_id"`
	SessionID  string              `json:"session_id"`
	Scnt       string              `json:"scnt"`
	Cookies    []*SerializedCookie `json:"cookies"`
	TeamID     string              `json:"team_id,omitempty"`
	ProviderID string              `json:"provider_id,omitempty"`
	ExpiresAt  time.Time           `json:"expires_at"`
}

Jump to

Keyboard shortcuts

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