ingester

package
v0.0.0-...-dca2783 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: BSD-3-Clause Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger(ctx context.Context) *zap.Logger

func NewIngesterHandler

func NewIngesterHandler(ctx context.Context, o *IngesterOptions) http.Handler

func NewTestableIngester

func NewTestableIngester(e *tests.TestEnv) (http.Handler, *data.User, error)

Types

type Config

type Config struct {
	ProductionLogging bool   `envconfig:"production_logging"`
	Addr              string `split_words:"true" default:"127.0.0.1:8080" required:"true"`
	PostgresURL       string `split_words:"true" default:"postgres://localhost/fieldkit?sslmode=disable" required:"true"`
	AwsProfile        string `envconfig:"aws_profile" default:"fieldkit" required:"true"`
	AwsId             string `split_words:"true" default:""`
	AwsSecret         string `split_words:"true" default:""`
	Archiver          string `split_words:"true" default:"default" required:"true"`
	SessionKey        string `split_words:"true"`
	StatsdAddress     string `split_words:"true" default:""`
	StreamsBucketName string `split_words:"true" default:""`
	Help              bool
}

type IncomingHeaders

type IncomingHeaders struct {
	ContentType     string
	ContentLength   int32
	MediaType       string
	MediaTypeParams map[string]string
	XForwardedFor   string
	FkType          string
	FkDeviceID      []byte
	FkGenerationID  []byte
	FkDeviceName    string
	FkBlocks        []int64
	FkFlags         []int64
}

type Ingester

type Ingester struct {
	Handler http.Handler
	Options *IngesterOptions
	// contains filtered or unexported fields
}

func NewIngester

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

func (*Ingester) Close

func (i *Ingester) Close() error

type IngesterOptions

type IngesterOptions struct {
	Database   *sqlxcache.DB
	Files      files.FileArchive
	Publisher  jobs.MessagePublisher
	Metrics    *logging.Metrics
	JwtHMACKey []byte
}

type IngestionSuccessful

type IngestionSuccessful struct {
	ID       int64  `json:"id"`
	UploadID string `json:"upload_id"`
}

type ServiceError

type ServiceError struct {
	ID     string `json:"id"`
	Code   string `json:"code"`
	Detail string `json:"detail"`
	Status int32  `json:"status"`
}

func NewUnauthorizedServiceError

func NewUnauthorizedServiceError() *ServiceError

Jump to

Keyboard shortcuts

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