web

package
v0.0.0-...-0dfd57a Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Service web provides a web dashboard and communication between sarif and HTTP.

Index

Constants

View Source
const (
	REST_URL = "/api/v0/"
)

Variables

View Source
var Module = &services.Module{
	Name:        "web",
	Version:     "1.0",
	NewInstance: New,
}

Functions

func GenerateApiKey

func GenerateApiKey() (string, error)

func RequestToMessage

func RequestToMessage(req *http.Request, urlPrefix string) (sarif.Message, error)

Types

type Config

type Config struct {
	Interface      string
	ApiKeys        map[string]string
	AllowedActions map[string][]string
}

type Dependencies

type Dependencies struct {
	Config        services.Config
	ClientFactory sarif.ClientFactory
	Client        sarif.Client
}

type Server

type Server struct {
	Config services.Config

	ClientFactory sarif.ClientFactory

	Client sarif.Client
	// contains filtered or unexported fields
}

func New

func New(deps *Dependencies) *Server

func (*Server) Disable

func (s *Server) Disable() error

func (*Server) Enable

func (s *Server) Enable() error

Jump to

Keyboard shortcuts

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