codex

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileName = "codex.toml"

Variables

This section is empty.

Functions

Types

type Config

type Config struct {
	Upload UploadConfig `toml:"upload"`
	Kernel KernelConfig `toml:"kernel"`
	// contains filtered or unexported fields
}

func GetOrInitCodexConfig

func GetOrInitCodexConfig(dirname string) (*Config, error)

func InitConfig added in v0.0.12

func InitConfig(dirname string) (*Config, error)

Initialize a new codex config file

func (*Config) Save

func (c *Config) Save() error

func (*Config) Unmarshal

func (c *Config) Unmarshal(data []byte) error

func (*Config) UnmarshalFromFile

func (c *Config) UnmarshalFromFile(filename string) error

type Details added in v0.0.10

type Details struct {
	Name       string
	KernelSpec KernelSpec `json:"kernelSpec"`
}

type KernelConfig added in v0.0.12

type KernelConfig struct {
	// The Docker image to use when running the kernel.
	// This overrides all other kernel config options.
	Image string `toml:"image,omitempty"`
	// An array of additional (usually Debian) packages to install
	// (e.g., {"texlive-latex-base"} if the `latex` command is required).
	SystemPackages []string `toml:"system_packages"`
}

type KernelSpec added in v0.0.10

type KernelSpec struct {
	ID          string   `json:"id"`
	BuildStatus string   `json:"buildStatus"`
	Events      []string `json:"events"`
	BuildLog    []string `json:"buildLog"`
}

func WaitForKernelBuildCompleted added in v0.0.10

func WaitForKernelBuildCompleted(
	ctx context.Context,
	client *graphql.Client,
	codexId string,
) (*KernelSpec, error)

WaitForKernelBuildCompleted polls the API server until the kernel build is completed.

type UploadCodexOptions

type UploadCodexOptions struct {
	// The codex directory
	Dir string
}

type UploadConfig

type UploadConfig struct {
	// The ID of the codex category where the codex will be uploaded.
	CodexCategory string `toml:"codex_category"`
	// The name of the codex (as displayed in the Pathbird UI).
	Name string `toml:"name"`
	// The ID of the codex (if being re-uploaded).
	CodexId string `toml:"codex_id,omitempty"`
}

Jump to

Keyboard shortcuts

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