effx

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client encapsulates communication with the API.

func New

func New(cfg *Configuration) (*Client, error)

New returns an effx Client encapsulating operations with the API

func (*Client) DetectServices added in v0.0.3

func (c *Client) DetectServices(workDir string) error

DetectServices attempts to detect services based on repo work dir.

func (*Client) IsFeatureDisabled added in v0.0.3

func (c *Client) IsFeatureDisabled(feature string) bool

IsFeatureDisabled returns if a given feature is disabled. example: LANGUAGE_DETECTION

func (*Client) Sync

func (c *Client) Sync(syncRequest *SyncRequest) error

Sync attempts to synchronize provided contents with the upstream api.

type Configuration

type Configuration struct {
	APIHost string
	APIKey  string
	Disable cli.StringSlice
}

Configuration encapsulates information needed for communicating with effx

func DefaultConfigWithFlags

func DefaultConfigWithFlags() (*Configuration, []cli.Flag)

DefaultConfigWithFlags returns configuration and flags specific to effx

func (*Configuration) Validate

func (c *Configuration) Validate() error

Validate ensures the configuration provided contains the required information.

type SyncError

type SyncError struct {
	Message string `json:"message,omitempty"`
}

SyncError contains information provided when an error occurs

type SyncRequest

type SyncRequest struct {
	FileContents string            `json:"fileContents,omitempty"`
	Tags         map[string]string `json:"tags,omitempty"`
	Annotations  map[string]string `json:"annotations,omitempty"`
}

SyncRequest contains a config blob for indexing.

Jump to

Keyboard shortcuts

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