api

package
v0.0.0-...-2b46327 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorMessage

func ErrorMessage(m string) []byte

func MarshalToJson

func MarshalToJson(m interface{}) []byte

func SendError

func SendError(err error, writer http.ResponseWriter, errcode int)

func SendJsonResponse

func SendJsonResponse(m interface{}, writer http.ResponseWriter) error

func Start

func Start(addr string,
	pi *pack.PackIndex,
	rc *pack.RunConfig,
	datadir string,
	staticdir string,
	SSLCertificatePath string,
	SSLKeyPath string)

Types

type ActivateRequest

type ActivateRequest struct {
	PackName string
}

type ActivateResponse

type ActivateResponse struct {
	Message string
}

type AddRoute

type AddRoute struct {
	Route *integrations.Route
}

func (*AddRoute) Parse

func (routeMessage *AddRoute) Parse() error

type AddUserMessage

type AddUserMessage struct {
	Message string
}

type AddVariableRequest

type AddVariableRequest struct {
	Key   string
	Value string
}

requests

type Claims

type Claims struct {
	Username string
	jwt.StandardClaims
}

type CloneRequest

type CloneRequest struct {
	PackName string
	Repo     string
}

type CloneResponse

type CloneResponse struct {
	Message string
}

type Credentials

type Credentials struct {
	Password string
	Username string
}

Auth messages

type DeleteRoute

type DeleteRoute struct {
	Path string
}

type DeleteVaribleRequest

type DeleteVaribleRequest struct {
	Key string
}

type Error

type Error struct {
	Message string
}

type GetIntegration

type GetIntegration struct {
	Integration string
	Addr        string
	Port        string
	Routes      []*integrations.Route
}

type GetPacksResponse

type GetPacksResponse struct {
	Packs []*pack.Pack
}

Pack messages

type GetRoute

type GetRoute struct {
	Route          *integrations.Route
	ResponseString string
}

type GetRouteRequest

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

type GetRunnerResponse

type GetRunnerResponse struct {
	RunConfig *pack.RunConfig
}

type Hash

type Hash struct {
}

func (*Hash) Compare

func (c *Hash) Compare(hash string, s string) error

Compare string to generated hash

func (*Hash) Generate

func (c *Hash) Generate(s string) (string, error)

type JSONPasswordDB

type JSONPasswordDB struct {
	Path string
}

func (*JSONPasswordDB) Write

func (jpdb *JSONPasswordDB) Write(db map[string]*User) error

type LoginMessage

type LoginMessage struct {
	Message  string
	Username string
	Settings settings.Settings
}

type MoxsoarMessage

type MoxsoarMessage interface {
	Parse() error
}

type SaveRequest

type SaveRequest struct {
	PackName      string
	CommitMessage string
	Author        object.Signature
}

type StatusMessage

type StatusMessage struct {
	Message string
}

type TrackerStatus

type TrackerStatus struct {
	Connected bool
	Message   string
}

Status messages

type UpdateRequest

type UpdateRequest struct {
	PackName string
}

type User

type User struct {
	Credentials Credentials

	Name string
}

Jump to

Keyboard shortcuts

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