controller

package
v0.0.0-...-7481685 Latest Latest
Warning

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

Go to latest
Published: May 3, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Cmd = &cobra.Command{
		Use:     "space-keys",
		Aliases: []string{"sk"},
		Short:   "Fetch all spaces in your Confluence instance",
		Long:    "Fetch all spaces in your Confluence instance, displaying their - ids, names and space keys.",
		RunE: func(cmd *cobra.Command, args []string) error {
			provider := repo.NewConfluenceProvider(
				os.Getenv("ATLASSIAN_URL"),
				os.Getenv("ATLASSIAN_USERNAME"),
				os.Getenv("ATLASSIAN_TOKEN"),
			)
			spaces, err := getSpaces(provider, batchSize)

			if err != nil {
				return err
			}

			slog.Info("Confluence spaces:")
			for _, space := range spaces {
				slog.Info(space.AsString())
			}

			return nil
		},
	}
)

Functions

This section is empty.

Types

type Provider

type Provider interface {
	GetSpaces(batchSize int) ([]*entity.Space, error)
}

Jump to

Keyboard shortcuts

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