Help us shape the future of Go! Take the 2026 Go Developer Survey

export

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package export provides functionality for exporting and importing Prism profiles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportProfiles

func ExportProfiles(profileManager *profile.ManagerEnhanced, profiles []profile.Profile, outputPath string, options ExportOptions) error

ExportProfiles exports profiles to a file

Types

type ExportFormat

type ExportFormat struct {
	Version    string            `json:"version"`
	ExportedAt time.Time         `json:"exported_at"`
	Profiles   []profile.Profile `json:"profiles"`
	Metadata   map[string]string `json:"metadata"`
}

ExportFormat defines the format version of exported profiles

type ExportOptions

type ExportOptions struct {
	IncludeCredentials bool
	IncludeInvitations bool
	Password           string
	Format             string
}

ExportOptions defines options for profile export

func DefaultExportOptions

func DefaultExportOptions() ExportOptions

DefaultExportOptions returns default export options

type ImportMode

type ImportMode string

ImportMode defines how to handle conflicting profiles during import

const (
	// ImportModeSkip skips profiles that already exist
	ImportModeSkip ImportMode = "skip"
	// ImportModeOverwrite overwrites existing profiles
	ImportModeOverwrite ImportMode = "overwrite"
	// ImportModeRename renames imported profiles to avoid conflicts
	ImportModeRename ImportMode = "rename"
)

type ImportOptions

type ImportOptions struct {
	ImportMode        ImportMode
	ProfileFilter     []string
	ImportCredentials bool
	Password          string
}

ImportOptions defines options for profile import

func DefaultImportOptions

func DefaultImportOptions() ImportOptions

DefaultImportOptions returns default import options

type ImportResult

type ImportResult struct {
	Success          bool
	ProfilesImported int
	FailedProfiles   map[string]string
	Error            string
}

ImportResult contains the results of a profile import operation

func ImportProfiles

func ImportProfiles(profileManager *profile.ManagerEnhanced, inputPath string, options ImportOptions) (*ImportResult, error)

ImportProfiles imports profiles from a file

Jump to

Keyboard shortcuts

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