api

package
v0.0.0-...-5178349 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	docRoot string,
	bpdbBackend bpdb.Bpdb,
	bpSchemaBackend bpdb.BpSchemaBackend,
	bpKinesisConfigBackend bpdb.BpKinesisConfigBackend,
	conf *Config,
	ingCont ingester.Controller,
	slackbotURL string,
	readonly bool,
	s3Uploader s3manageriface.UploaderAPI) core.Subprocess

New returns an API process.

func NewS3Uploader

func NewS3Uploader() *s3manager.Uploader

NewS3Uploader returns a new S3 uploader

func SimpleLogger

func SimpleLogger(c *web.C, h http.Handler) http.Handler

SimpleLogger is a custom middleware logger that doesn't add colour

Types

type Config

type Config struct {
	CacheTimeoutSecs      int      `json:"cacheTimeoutSecs"`
	S3BpConfigsBucketName string   `json:"s3BPConfigsBucketName"`
	S3BpConfigsPrefix     string   `json:"s3BPConfigsPrefix"`
	Blacklist             []string `json:"blacklist"`
}

Config configures the API's webserver.

type MockS3UploaderAPI

type MockS3UploaderAPI struct {
	s3manageriface.UploaderAPI
	// contains filtered or unexported fields
}

MockS3UploaderAPI is a wrapper for the S3 manager UploaderAPI

func NewMockS3Uploader

func NewMockS3Uploader() *MockS3UploaderAPI

NewMockS3Uploader returns a new mock S3 uploader

func (*MockS3UploaderAPI) ResetUploadSuccess

func (s *MockS3UploaderAPI) ResetUploadSuccess()

ResetUploadSuccess sets uploadSuccessful to false

func (*MockS3UploaderAPI) Upload

Upload is a mock of S3Manager's Upload function

func (*MockS3UploaderAPI) UploadSucceeded

func (s *MockS3UploaderAPI) UploadSucceeded() bool

UploadSucceeded returns whether a mock upload was successful

type SchemaSuggestion

type SchemaSuggestion struct {
	EventName string
	Occurred  int
}

SchemaSuggestion indicates a schema for an event that has occurred a certain number of times.

Jump to

Keyboard shortcuts

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