init

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleInitError

func HandleInitError(err error)

HandleInitError provides appropriate error handling based on error type

Types

type ErrorType

type ErrorType int

ErrorType represents the type of initialization error

const (
	// ErrorTypeConfig indicates a configuration file error
	ErrorTypeConfig ErrorType = iota
	// ErrorTypeGitHub indicates a GitHub API error
	ErrorTypeGitHub
	// ErrorTypeFileSystem indicates a file system error
	ErrorTypeFileSystem
	// ErrorTypeValidation indicates a validation error
	ErrorTypeValidation
)

type InitError

type InitError struct {
	Type    ErrorType
	Message string
	Cause   error
}

InitError represents an initialization error with context

func NewConfigError

func NewConfigError(message string, cause error) *InitError

NewConfigError creates a new configuration error

func NewFileSystemError

func NewFileSystemError(message string, cause error) *InitError

NewFileSystemError creates a new file system error

func NewGitHubError

func NewGitHubError(message string, cause error) *InitError

NewGitHubError creates a new GitHub API error

func NewValidationError

func NewValidationError(message string) *InitError

NewValidationError creates a new validation error

func (*InitError) Error

func (e *InitError) Error() string

Error implements the error interface

func (*InitError) Unwrap

func (e *InitError) Unwrap() error

Unwrap returns the underlying error

type InteractivePrompt

type InteractivePrompt struct {
	// contains filtered or unexported fields
}

InteractivePrompt handles interactive user input

func NewInteractivePrompt

func NewInteractivePrompt() *InteractivePrompt

NewInteractivePrompt creates a new InteractivePrompt instance

func (*InteractivePrompt) ConfigureFieldMapping

func (p *InteractivePrompt) ConfigureFieldMapping(field project.Field) map[string]string

ConfigureFieldMapping allows user to configure field mappings

func (*InteractivePrompt) ConfirmOverwrite

func (p *InteractivePrompt) ConfirmOverwrite() bool

ConfirmOverwrite prompts the user to confirm overwriting an existing file

func (*InteractivePrompt) GetStringInput

func (p *InteractivePrompt) GetStringInput(prompt string, defaultValue string) string

GetStringInput prompts for a string input with an optional default value

func (*InteractivePrompt) SelectProject

func (p *InteractivePrompt) SelectProject(projects []project.Project, source string) *project.Project

SelectProject presents a list of projects and allows the user to select one

type MetadataManager

type MetadataManager struct {
	// contains filtered or unexported fields
}

MetadataManager handles project metadata fetching and management

func NewMetadataManager

func NewMetadataManager(client *project.Client) *MetadataManager

NewMetadataManager creates a new MetadataManager instance

func (*MetadataManager) BuildMetadata

func (m *MetadataManager) BuildMetadata(proj *project.Project, fields []project.Field) (*config.ConfigMetadata, error)

BuildMetadata builds complete metadata structure for a project

func (*MetadataManager) FetchFieldMetadata

func (m *MetadataManager) FetchFieldMetadata(projectID string, fieldName string) (*config.FieldMetadata, error)

FetchFieldMetadata fetches field metadata including field ID and option IDs

func (*MetadataManager) FetchProjectMetadata

func (m *MetadataManager) FetchProjectMetadata(projectID string) (*config.ProjectMetadata, error)

FetchProjectMetadata fetches project metadata including node ID

type ProjectDetector

type ProjectDetector struct {
	// contains filtered or unexported fields
}

ProjectDetector handles project detection and listing

func NewProjectDetector

func NewProjectDetector() (*ProjectDetector, error)

NewProjectDetector creates a new ProjectDetector instance

func (*ProjectDetector) DetectCurrentRepo

func (d *ProjectDetector) DetectCurrentRepo() (org, repo string, err error)

DetectCurrentRepo detects the current repository using GitHub CLI

func (*ProjectDetector) ListOrgProjects

func (d *ProjectDetector) ListOrgProjects(org string) ([]project.Project, error)

ListOrgProjects lists all projects in an organization

func (*ProjectDetector) ListRepoProjects

func (d *ProjectDetector) ListRepoProjects(org, repo string) ([]project.Project, error)

ListRepoProjects lists all projects associated with a repository

Jump to

Keyboard shortcuts

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