api

package
v1.128.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 38 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DatasetID = "id"
View Source
const DatasetType = "type"
View Source
const IsBasedOn = "is_based_on"
View Source
const SortOrder = "sort_order"

Variables

View Source
var MaxIDs = func() int {
	return maxIDs
}

MaxIDs returns the maximum number of IDs acceptable in a list

Functions

This section is empty.

Types

type API

type API interface {
	CreateDatasetAPI(string, *mux.Router, store.DataStore) *DatasetAPI
}

API provides an interface for the routes

type AuthEntityData added in v1.102.0

type AuthEntityData struct {
	EntityData    *permissionsAPISDK.EntityData
	IsServiceAuth bool
}

AuthEntityData holds the entity data for an authenticated request along with whether the request was made by a service account or user

func CreateAuthEntityData added in v1.102.0

func CreateAuthEntityData(entityData *permissionsAPISDK.EntityData, isService bool) *AuthEntityData

CreateAuthEntityData creates an AuthEntityData from the provided EntityData and a bool indicating whether the token belongs to a service account

type DatasetAPI

type DatasetAPI struct {
	Router *mux.Router

	EnablePrePublishView bool

	MaxRequestOptions int
	// contains filtered or unexported fields
}

DatasetAPI manages importing filters against a dataset

func Setup added in v1.22.0

func Setup(ctx context.Context, cfg *config.Configuration, router *mux.Router, dataStore store.DataStore, urlBuilder *url.Builder, downloadGenerators map[models.DatasetType]DownloadsGenerator, authMiddleware auth.Middleware, enableURLRewriting bool, smDatasetAPI *application.StateMachineDatasetAPI, auditService application.AuditService, staticDatasetService application.StaticDatasetService, permissionsChecker auth.PermissionsChecker, idClient *clientsidentity.Client, filesAPIClient filesAPISDK.Clienter, topicAPIClient topicAPISDK.Clienter) *DatasetAPI

Setup creates a new Dataset API instance and register the API routes based on the application configuration.

type DownloadsGenerator

type DownloadsGenerator interface {
	Generate(ctx context.Context, datasetID, instanceID, edition, version string) error
}

DownloadsGenerator pre generates full file downloads for the specified dataset/edition/version

type PublishCheck

type PublishCheck struct {
	Datastore store.Storer
}

PublishCheck Checks if an version has been published

func (*PublishCheck) Check

func (d *PublishCheck) Check(handle func(http.ResponseWriter, *http.Request), action string) http.HandlerFunc

Check wraps a HTTP handle. Checks that the state is not published TODO: Refactor this to reduce the complexity

Jump to

Keyboard shortcuts

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