transport

package
v0.0.0-...-4f5e8d6 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ConfigureGraphQLRoute

func ConfigureGraphQLRoute(route httproute.Route) []httproute.Route

func ConfigurePresignImagesUploadRoute

func ConfigurePresignImagesUploadRoute(route httproute.Route) httproute.Route

func ConfigureUserExportCreateRoute

func ConfigureUserExportCreateRoute(route httproute.Route) httproute.Route

func ConfigureUserExportGetRoute

func ConfigureUserExportGetRoute(route httproute.Route) httproute.Route

func ConfigureUserImportCreateRoute

func ConfigureUserImportCreateRoute(route httproute.Route) httproute.Route

func ConfigureUserImportGetRoute

func ConfigureUserImportGetRoute(route httproute.Route) httproute.Route

Types

type GraphQLHandler

type GraphQLHandler struct {
	GraphQLContext *graphql.Context
	AppDatabase    *appdb.Handle
}

func (*GraphQLHandler) ServeHTTP

func (h *GraphQLHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type JSONResponseWriter

type JSONResponseWriter interface {
	WriteResponse(rw http.ResponseWriter, resp *api.Response)
}

type PresignImagesUploadHandler

type PresignImagesUploadHandler struct {
	JSON            JSONResponseWriter
	HTTPProto       httputil.HTTPProto
	HTTPHost        httputil.HTTPHost
	AppID           config.AppID
	PresignProvider PresignProvider
	Logger          PresignImagesUploadHandlerLogger
}

func (*PresignImagesUploadHandler) ServeHTTP

func (h *PresignImagesUploadHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

type PresignImagesUploadHandlerLogger

type PresignImagesUploadHandlerLogger struct{ *log.Logger }

func NewPresignImagesUploadHandlerLogger

func NewPresignImagesUploadHandlerLogger(lf *log.Factory) PresignImagesUploadHandlerLogger

type PresignImagesUploadResponse

type PresignImagesUploadResponse struct {
	UploadURL string `json:"upload_url"`
}

type PresignProvider

type PresignProvider interface {
	PresignPostRequest(url *url.URL) error
}

type UIParamMiddleware

type UIParamMiddleware struct{}

func (*UIParamMiddleware) Handle

func (m *UIParamMiddleware) Handle(next http.Handler) http.Handler

type UserExportCreateHandler

type UserExportCreateHandler struct {
	AppID                 config.AppID
	AdminAPIFeatureConfig *config.AdminAPIFeatureConfig
	JSON                  JSONResponseWriter
	Producer              UserExportCreateProducer
	UsageLimiter          UserExportUsageLimiter
	CloudStorage          UserExportCreateHandlerCloudStorage
	Service               UserExportCreateHandlerUserExportService
}

func (*UserExportCreateHandler) ServeHTTP

type UserExportCreateHandlerCloudStorage

type UserExportCreateHandlerCloudStorage interface {
	PresignGetObject(ctx context.Context, name string, expire time.Duration) (*url.URL, error)
}

type UserExportCreateHandlerUserExportService

type UserExportCreateHandlerUserExportService interface {
	ParseExportRequest(w http.ResponseWriter, r *http.Request) (*userexport.Request, error)
}

type UserExportCreateProducer

type UserExportCreateProducer interface {
	NewTask(appID string, input json.RawMessage, taskIDPrefix string) *redisqueue.Task
	EnqueueTask(ctx context.Context, task *redisqueue.Task) error
}

type UserExportGetHandler

type UserExportGetHandler struct {
	AppID        config.AppID
	JSON         JSONResponseWriter
	UserExports  UserExportGetProducer
	CloudStorage UserExportGetHandlerCloudStorage
}

func (*UserExportGetHandler) ServeHTTP

func (h *UserExportGetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type UserExportGetHandlerCloudStorage

type UserExportGetHandlerCloudStorage interface {
	PresignGetObject(ctx context.Context, name string, expire time.Duration) (*url.URL, error)
}

type UserExportGetProducer

type UserExportGetProducer interface {
	GetTask(ctx context.Context, item *redisqueue.QueueItem) (*redisqueue.Task, error)
}

type UserExportUsageLimiter

type UserExportUsageLimiter interface {
	Reserve(ctx context.Context, name usage.LimitName, config *config.UsageLimitConfig) (*usage.Reservation, error)
}

type UserImportCreateHandler

type UserImportCreateHandler struct {
	JSON        JSONResponseWriter
	UserImports UserImportJobEnqueuer
}

func (*UserImportCreateHandler) ServeHTTP

type UserImportGetHandler

type UserImportGetHandler struct {
	AppID       config.AppID
	JSON        JSONResponseWriter
	UserImports UserImportJobGetter
}

func (*UserImportGetHandler) ServeHTTP

func (h *UserImportGetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type UserImportJobEnqueuer

type UserImportJobEnqueuer interface {
	EnqueueJob(ctx context.Context, request *userimport.Request) (*userimport.Response, error)
}

type UserImportJobGetter

type UserImportJobGetter interface {
	GetJob(ctx context.Context, jobID string) (*userimport.Response, error)
}

Jump to

Keyboard shortcuts

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