callbacks

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, config *Config) error

func BuildDir

func BuildDir(config *Config) string

BuildDir returns the build dir.

func CleanupBuildDir

func CleanupBuildDir(config *Config)

CleanupBuildDir removes the build dir.

func ConfigFlags

func ConfigFlags(cmd *cobra.Command, prefix string) error

ConfigFlags helps configure cobra and viper flags.

Types

type Callbacks

type Callbacks struct {
	deadlock.Mutex
	// contains filtered or unexported fields
}

func Start

func Start(
	ctx context.Context,
	config *Config,
) (*Callbacks, error)

Start creates and starts the GraphQL HTTP server.

type Config

type Config struct {
	Path             string `mapstructure:"path"`
	DevCmd           string `mapstructure:"devcmd"`
	BuildCmd         string `mapstructure:"buildcmd"`
	ServeCmd         string `mapstructure:"servecmd"`
	BuildDir         string `mapstructure:"builddir"`
	Token            string `mapstructure:"token"`
	SessionToken     string `mapstructure:"sessionTokenPath"`
	SaveSessionToken bool   `mapstructure:"sessionToken"`
}

Config is server configuration.

func (*Config) Validate

func (c *Config) Validate() error

Validate configuration is ok.

Jump to

Keyboard shortcuts

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