handlers

package
v0.0.0-...-45bc272 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessHandler

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

func NewAccessHandler

func NewAccessHandler(
	service service.AccessService,
	metabaseService service.MetabaseService,
	gcpProjectID string,
) *AccessHandler

func (*AccessHandler) DeleteAccessRequest

func (h *AccessHandler) DeleteAccessRequest(ctx context.Context, _ *http.Request, _ any) (*transport.Empty, error)

func (*AccessHandler) GetAccessRequests

func (h *AccessHandler) GetAccessRequests(ctx context.Context, r *http.Request, _ interface{}) (*service.AccessRequestsWrapper, error)

func (*AccessHandler) GrantAccessToDataset

func (h *AccessHandler) GrantAccessToDataset(ctx context.Context, _ *http.Request, in service.GrantAccessData) (*transport.Empty, error)

func (*AccessHandler) NewAccessRequest

func (*AccessHandler) ProcessAccessRequest

func (h *AccessHandler) ProcessAccessRequest(ctx context.Context, r *http.Request, _ any) (*transport.Empty, error)

func (*AccessHandler) RevokeAccessToDataset

func (h *AccessHandler) RevokeAccessToDataset(ctx context.Context, r *http.Request, _ any) (*transport.Empty, error)

func (*AccessHandler) UpdateAccessRequest

func (h *AccessHandler) UpdateAccessRequest(ctx context.Context, _ *http.Request, in service.UpdateAccessRequestDTO) (*transport.Empty, error)

type BigQueryHandler

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

func NewBigQueryHandler

func NewBigQueryHandler(service service.BigQueryService) *BigQueryHandler

func (*BigQueryHandler) GetBigQueryColumns

func (h *BigQueryHandler) GetBigQueryColumns(ctx context.Context, r *http.Request, _ any) (*service.BQColumns, error)

func (*BigQueryHandler) GetBigQueryDatasets

func (h *BigQueryHandler) GetBigQueryDatasets(ctx context.Context, r *http.Request, _ any) (*service.BQDatasets, error)

func (*BigQueryHandler) GetBigQueryTables

func (h *BigQueryHandler) GetBigQueryTables(ctx context.Context, r *http.Request, _ any) (*service.BQTables, error)

func (*BigQueryHandler) SyncBigQueryTables

func (h *BigQueryHandler) SyncBigQueryTables(ctx context.Context, _ *http.Request, _ any) (*transport.Empty, error)

type ContextKeyType

type ContextKeyType string
const (
	ContextKeyTeam      ContextKeyType = "team"
	ContextKeyTeamEmail ContextKeyType = "team_email"
	ContextKeyNadaToken ContextKeyType = "nada_token"
	FormNameNewStory                   = "nada-backend-new-story"
)

type DataProductsHandler

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

func (*DataProductsHandler) CreateDataProduct

func (*DataProductsHandler) CreateDataset

func (h *DataProductsHandler) CreateDataset(ctx context.Context, _ *http.Request, in service.NewDataset) (*string, error)

func (*DataProductsHandler) DeleteDataProduct

func (h *DataProductsHandler) DeleteDataProduct(ctx context.Context, _ *http.Request, _ interface{}) (*transport.Empty, error)

func (*DataProductsHandler) DeleteDataset

func (h *DataProductsHandler) DeleteDataset(ctx context.Context, _ *http.Request, _ interface{}) (*transport.Empty, error)

func (*DataProductsHandler) GetAccessiblePseudoDatasetsForUser

func (h *DataProductsHandler) GetAccessiblePseudoDatasetsForUser(ctx context.Context, _ *http.Request, _ interface{}) ([]*service.PseudoDataset, error)

func (*DataProductsHandler) GetDataProduct

func (*DataProductsHandler) GetDataset

func (h *DataProductsHandler) GetDataset(ctx context.Context, _ *http.Request, _ interface{}) (*service.Dataset, error)

func (*DataProductsHandler) GetDatasetsMinimal

func (h *DataProductsHandler) GetDatasetsMinimal(ctx context.Context, _ *http.Request, _ interface{}) ([]*service.DatasetMinimal, error)

func (*DataProductsHandler) UpdateDataProduct

func (*DataProductsHandler) UpdateDataset

type Handlers

type Handlers struct {
	StoryHandler          *StoryHandler
	TokenHandler          *TokenHandler
	DataProductsHandler   *DataProductsHandler
	MetabaseHandler       *MetabaseHandler
	AccessHandler         *AccessHandler
	ProductAreasHandler   *ProductAreasHandler
	BigQueryHandler       *BigQueryHandler
	SearchHandler         *SearchHandler
	UserHandler           *UserHandler
	SlackHandler          *SlackHandler
	JoinableViewsHandler  *JoinableViewsHandler
	InsightProductHandler *InsightProductHandler
	TeamKatalogenHandler  *TeamkatalogenHandler
	PollyHandler          *PollyHandler
	KeywordsHandler       *KeywordsHandler
}

func NewHandlers

func NewHandlers(
	s *core.Services,
	cfg config.Config,
	mappingQueue chan metabase_mapper.Work,
	log zerolog.Logger,
) *Handlers

type InsightProductHandler

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

func NewInsightProductHandler

func NewInsightProductHandler(service service.InsightProductService) *InsightProductHandler

func (*InsightProductHandler) CreateInsightProduct

func (*InsightProductHandler) DeleteInsightProduct

func (h *InsightProductHandler) DeleteInsightProduct(ctx context.Context, _ *http.Request, _ any) (*service.InsightProduct, error)

func (*InsightProductHandler) GetInsightProduct

func (h *InsightProductHandler) GetInsightProduct(ctx context.Context, _ *http.Request, _ any) (*service.InsightProduct, error)

func (*InsightProductHandler) UpdateInsightProduct

type JoinableViewsHandler

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

func NewJoinableViewsHandler

func NewJoinableViewsHandler(service service.JoinableViewsService) *JoinableViewsHandler

func (*JoinableViewsHandler) CreateJoinableViews

func (h *JoinableViewsHandler) CreateJoinableViews(ctx context.Context, _ *http.Request, in service.NewJoinableViews) (string, error)

FIXME: return something other than a string

func (*JoinableViewsHandler) GetJoinableView

func (*JoinableViewsHandler) GetJoinableViewsForUser

func (h *JoinableViewsHandler) GetJoinableViewsForUser(ctx context.Context, _ *http.Request, _ any) ([]service.JoinableView, error)

type KeywordsHandler

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

func NewKeywordsHandler

func NewKeywordsHandler(service service.KeywordsService) *KeywordsHandler

func (*KeywordsHandler) GetKeywordsListSortedByPopularity

func (h *KeywordsHandler) GetKeywordsListSortedByPopularity(ctx context.Context, _ *http.Request, _ any) (*service.KeywordsList, error)

func (*KeywordsHandler) UpdateKeywords

func (h *KeywordsHandler) UpdateKeywords(ctx context.Context, _ *http.Request, input service.UpdateKeywordsDto) (*transport.Empty, error)

type MetabaseHandler

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

func NewMetabaseHandler

func NewMetabaseHandler(service service.MetabaseService, mappingQueue chan metabase_mapper.Work) *MetabaseHandler

func (*MetabaseHandler) MapDataset

type PollyHandler

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

func NewPollyHandler

func NewPollyHandler(s service.PollyService) *PollyHandler

func (*PollyHandler) SearchPolly

func (h *PollyHandler) SearchPolly(ctx context.Context, r *http.Request, _ any) ([]*service.QueryPolly, error)

type ProductAreasHandler

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

func NewProductAreasHandler

func NewProductAreasHandler(service service.ProductAreaService) *ProductAreasHandler

func (*ProductAreasHandler) GetProductAreaWithAssets

func (h *ProductAreasHandler) GetProductAreaWithAssets(ctx context.Context, _ *http.Request, _ any) (*service.ProductAreaWithAssets, error)

func (*ProductAreasHandler) GetProductAreas

func (h *ProductAreasHandler) GetProductAreas(ctx context.Context, _ *http.Request, _ any) (*service.ProductAreasDto, error)

type SearchHandler

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

func NewSearchHandler

func NewSearchHandler(service service.SearchService) *SearchHandler

func (*SearchHandler) Search

type SlackHandler

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

func NewSlackHandler

func NewSlackHandler(service service.SlackService) *SlackHandler

func (*SlackHandler) IsValidSlackChannel

func (h *SlackHandler) IsValidSlackChannel(_ context.Context, r *http.Request, _ any) (*isValidSlackChannelResult, error)

type StoryHandler

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

func NewStoryHandler

func NewStoryHandler(emailSuffix string, storyService service.StoryService, tokenService service.TokenService, log zerolog.Logger) *StoryHandler

func (*StoryHandler) AppendStoryFiles

func (h *StoryHandler) AppendStoryFiles(ctx context.Context, r *http.Request, _ any) (*transport.Empty, error)

func (*StoryHandler) CreateStory

func (h *StoryHandler) CreateStory(ctx context.Context, r *http.Request, _ any) (*service.Story, error)

func (*StoryHandler) CreateStoryForTeam

func (h *StoryHandler) CreateStoryForTeam(ctx context.Context, r *http.Request, newStory *service.NewStory) (*service.Story, error)

func (*StoryHandler) DeleteStory

func (h *StoryHandler) DeleteStory(ctx context.Context, _ *http.Request, _ any) (*service.Story, error)

func (*StoryHandler) GetIndex

func (h *StoryHandler) GetIndex(ctx context.Context, r *http.Request, _ any) (*transport.Redirect, error)

func (*StoryHandler) GetObject

func (h *StoryHandler) GetObject(ctx context.Context, r *http.Request, _ any) (*transport.ByteWriter, error)

func (*StoryHandler) GetStory

func (h *StoryHandler) GetStory(ctx context.Context, _ *http.Request, _ any) (*service.Story, error)

func (*StoryHandler) NadaTokenMiddleware

func (h *StoryHandler) NadaTokenMiddleware(next http.Handler) http.Handler

func (*StoryHandler) RecreateStoryFiles

func (h *StoryHandler) RecreateStoryFiles(ctx context.Context, r *http.Request, _ any) (*transport.Empty, error)

func (*StoryHandler) UpdateStory

func (h *StoryHandler) UpdateStory(ctx context.Context, _ *http.Request, in service.UpdateStoryDto) (*service.Story, error)

type TeamkatalogenHandler

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

func (*TeamkatalogenHandler) SearchTeamKatalogen

func (h *TeamkatalogenHandler) SearchTeamKatalogen(ctx context.Context, r *http.Request, _ any) ([]service.TeamkatalogenResult, error)

type TokenHandler

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

func NewTokenHandler

func NewTokenHandler(tokenService service.TokenService, tokenForAPIAccess string, log zerolog.Logger) *TokenHandler

func (*TokenHandler) GetAllTeamTokens

func (h *TokenHandler) GetAllTeamTokens(w http.ResponseWriter, r *http.Request)

func (*TokenHandler) RotateNadaToken

func (h *TokenHandler) RotateNadaToken(ctx context.Context, r *http.Request, _ any) (*transport.Empty, error)

type UserHandler

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

func NewUserHandler

func NewUserHandler(service service.UserService) *UserHandler

func (*UserHandler) GetUserData

func (h *UserHandler) GetUserData(ctx context.Context, _ *http.Request, _ any) (*service.UserInfo, error)

Jump to

Keyboard shortcuts

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