Documentation ¶
Index ¶
- func CreateMux(storageServices *storage.Services, apiFunctions *ScratchDataAPIStruct, ...) *chi.Mux
- func PrometheusMiddleware(next http.Handler) http.Handler
- func RunAPI(ctx context.Context, config config.API, mux *chi.Mux)
- func UserFromContext(c context.Context) (*models.User, bool)
- type CachedQueryData
- type Flattener
- type HorizontalFlattener
- type JSONData
- type MultiTableFlattener
- type ScratchDataAPIStruct
- func (a *ScratchDataAPIStruct) AddAPIKey(w http.ResponseWriter, r *http.Request)
- func (a *ScratchDataAPIStruct) AuthGetDatabaseID(ctx context.Context) int64
- func (a *ScratchDataAPIStruct) AuthGetTeamID(ctx context.Context) uint
- func (a *ScratchDataAPIStruct) AuthMiddleware(next http.Handler) http.Handler
- func (a *ScratchDataAPIStruct) Authenticator(ja *jwtauth.JWTAuth) func(http.Handler) http.Handler
- func (a *ScratchDataAPIStruct) Columns(w http.ResponseWriter, r *http.Request)
- func (a *ScratchDataAPIStruct) Copy(w http.ResponseWriter, r *http.Request)
- func (a *ScratchDataAPIStruct) CreateDestination(w http.ResponseWriter, r *http.Request)
- func (a *ScratchDataAPIStruct) CreateQuery(w http.ResponseWriter, r *http.Request)
- func (a *ScratchDataAPIStruct) GetDestinations(w http.ResponseWriter, r *http.Request)
- func (a *ScratchDataAPIStruct) Healthcheck(w http.ResponseWriter, r *http.Request)
- func (a *ScratchDataAPIStruct) Insert(w http.ResponseWriter, r *http.Request)
- func (a *ScratchDataAPIStruct) Login(w http.ResponseWriter, r *http.Request)
- func (a *ScratchDataAPIStruct) Logout(w http.ResponseWriter, r *http.Request)
- func (a *ScratchDataAPIStruct) OAuthCallback(w http.ResponseWriter, r *http.Request)
- func (a *ScratchDataAPIStruct) Select(w http.ResponseWriter, r *http.Request)
- func (a *ScratchDataAPIStruct) ShareData(w http.ResponseWriter, r *http.Request)
- func (a *ScratchDataAPIStruct) Tables(w http.ResponseWriter, r *http.Request)
- type VerticalFlattener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMux ¶
func CreateMux( storageServices *storage.Services, apiFunctions *ScratchDataAPIStruct, c config.ScratchDataConfig, destinationManager *destinations.DestinationManager, ) *chi.Mux
func PrometheusMiddleware ¶ added in v1.0.8
Types ¶
type CachedQueryData ¶ added in v1.0.7
type HorizontalFlattener ¶
type HorizontalFlattener struct{}
type MultiTableFlattener ¶ added in v1.0.12
type MultiTableFlattener struct {
// contains filtered or unexported fields
}
func NewMultiTableFlattener ¶ added in v1.0.12
func NewMultiTableFlattener() MultiTableFlattener
func (MultiTableFlattener) Flatten ¶ added in v1.0.12
func (f MultiTableFlattener) Flatten(table string, json string) ([]JSONData, error)
func (MultiTableFlattener) FlattenJSON ¶ added in v1.0.12
type ScratchDataAPIStruct ¶
type ScratchDataAPIStruct struct {
// contains filtered or unexported fields
}
func NewScratchDataAPI ¶
func NewScratchDataAPI( storageServices *storage.Services, destinationManager *destinations.DestinationManager, dataSink datasink.DataSink, conf config.ScratchDataConfig, ) (*ScratchDataAPIStruct, error)
func (*ScratchDataAPIStruct) AddAPIKey ¶ added in v1.0.7
func (a *ScratchDataAPIStruct) AddAPIKey(w http.ResponseWriter, r *http.Request)
func (*ScratchDataAPIStruct) AuthGetDatabaseID ¶
func (a *ScratchDataAPIStruct) AuthGetDatabaseID(ctx context.Context) int64
func (*ScratchDataAPIStruct) AuthGetTeamID ¶ added in v1.0.11
func (a *ScratchDataAPIStruct) AuthGetTeamID(ctx context.Context) uint
func (*ScratchDataAPIStruct) AuthMiddleware ¶
func (a *ScratchDataAPIStruct) AuthMiddleware(next http.Handler) http.Handler
func (*ScratchDataAPIStruct) Authenticator ¶ added in v1.0.11
func (a *ScratchDataAPIStruct) Authenticator(ja *jwtauth.JWTAuth) func(http.Handler) http.Handler
func (*ScratchDataAPIStruct) Columns ¶ added in v1.0.9
func (a *ScratchDataAPIStruct) Columns(w http.ResponseWriter, r *http.Request)
func (*ScratchDataAPIStruct) Copy ¶ added in v1.0.11
func (a *ScratchDataAPIStruct) Copy(w http.ResponseWriter, r *http.Request)
func (*ScratchDataAPIStruct) CreateDestination ¶ added in v1.0.7
func (a *ScratchDataAPIStruct) CreateDestination(w http.ResponseWriter, r *http.Request)
func (*ScratchDataAPIStruct) CreateQuery ¶ added in v1.0.7
func (a *ScratchDataAPIStruct) CreateQuery(w http.ResponseWriter, r *http.Request)
func (*ScratchDataAPIStruct) GetDestinations ¶ added in v1.0.7
func (a *ScratchDataAPIStruct) GetDestinations(w http.ResponseWriter, r *http.Request)
func (*ScratchDataAPIStruct) Healthcheck ¶ added in v1.0.10
func (a *ScratchDataAPIStruct) Healthcheck(w http.ResponseWriter, r *http.Request)
func (*ScratchDataAPIStruct) Insert ¶
func (a *ScratchDataAPIStruct) Insert(w http.ResponseWriter, r *http.Request)
func (*ScratchDataAPIStruct) Login ¶ added in v1.0.11
func (a *ScratchDataAPIStruct) Login(w http.ResponseWriter, r *http.Request)
func (*ScratchDataAPIStruct) Logout ¶ added in v1.0.11
func (a *ScratchDataAPIStruct) Logout(w http.ResponseWriter, r *http.Request)
func (*ScratchDataAPIStruct) OAuthCallback ¶ added in v1.0.11
func (a *ScratchDataAPIStruct) OAuthCallback(w http.ResponseWriter, r *http.Request)
func (*ScratchDataAPIStruct) Select ¶
func (a *ScratchDataAPIStruct) Select(w http.ResponseWriter, r *http.Request)
func (*ScratchDataAPIStruct) ShareData ¶ added in v1.0.7
func (a *ScratchDataAPIStruct) ShareData(w http.ResponseWriter, r *http.Request)
func (*ScratchDataAPIStruct) Tables ¶ added in v1.0.9
func (a *ScratchDataAPIStruct) Tables(w http.ResponseWriter, r *http.Request)
type VerticalFlattener ¶
type VerticalFlattener struct{}
Click to show internal directories.
Click to hide internal directories.