backendconfig

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LastSync string
)

Functions

func GetWorkspaceIDForWriteKey

func GetWorkspaceIDForWriteKey(writeKey string) string

func MakeBackendPostRequest

func MakeBackendPostRequest(endpoint string, data interface{}) (response []byte, ok bool)

func MakePostRequest

func MakePostRequest(url string, endpoint string, data interface{}) (response []byte, ok bool)

func Setup

func Setup()

Setup backend config

func Subscribe

func Subscribe(channel chan utils.DataEvent, topic string)

func WaitForConfig

func WaitForConfig()

Types

type BackendConfig

type BackendConfig interface {
	SetUp()
	Get() (SourcesT, bool)
	GetWorkspaceIDForWriteKey(string) string
}

type DestinationDefinitionT

type DestinationDefinitionT struct {
	ID          string
	Name        string
	DisplayName string
	Config      interface{}
}

type DestinationT

type DestinationT struct {
	ID                    string
	Name                  string
	DestinationDefinition DestinationDefinitionT
	Config                interface{}
	Enabled               bool
	Transformations       []TransformationT
	IsProcessorEnabled    bool
}

type MultiWorkspaceConfig

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

MultiWorkspaceConfig is a struct to hold variables necessary for supporting multiple workspaces.

func (*MultiWorkspaceConfig) Get

func (multiWorkspaceConfig *MultiWorkspaceConfig) Get() (SourcesT, bool)

Get returns sources from all hosted workspaces

func (*MultiWorkspaceConfig) GetWorkspaceIDForWriteKey

func (multiWorkspaceConfig *MultiWorkspaceConfig) GetWorkspaceIDForWriteKey(writeKey string) string

GetWorkspaceIDForWriteKey returns workspaceID for the given writeKey

func (*MultiWorkspaceConfig) SetUp

func (multiWorkspaceConfig *MultiWorkspaceConfig) SetUp()

SetUp sets up MultiWorkspaceConfig

type SourceDefinitionT

type SourceDefinitionT struct {
	ID   string
	Name string
}

type SourceT

type SourceT struct {
	ID               string
	Name             string
	SourceDefinition SourceDefinitionT
	Config           interface{}
	Enabled          bool
	WorkspaceID      string
	Destinations     []DestinationT
	WriteKey         string
}

type SourcesT

type SourcesT struct {
	EnableMetrics bool      `json:"enableMetrics"`
	Sources       []SourceT `json:"sources"`
}

func GetConfig

func GetConfig() SourcesT

type TransformationT

type TransformationT struct {
	ID          string
	Name        string
	Description string
	VersionID   string
}

type WorkspaceConfig

type WorkspaceConfig struct {
}

func (*WorkspaceConfig) Get

func (workspaceConfig *WorkspaceConfig) Get() (SourcesT, bool)

Get returns sources from the workspace

func (*WorkspaceConfig) GetWorkspaceIDForWriteKey

func (workspaceConfig *WorkspaceConfig) GetWorkspaceIDForWriteKey(writeKey string) string

func (*WorkspaceConfig) SetUp

func (workspaceConfig *WorkspaceConfig) SetUp()

type WorkspacesT

type WorkspacesT struct {
	WorkspaceSourcesMap map[string][]SourceT `json:"-"`
}

WorkspacesT holds sources of workspaces

Jump to

Keyboard shortcuts

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