api4datatug

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package api4datatug is the DataTug module's HTTP API layer. It translates HTTP into domain commands and back; the business logic lives in facade4datatug and the storage access in dal-go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHttpRoutes

func RegisterHttpRoutes(handle extension.HTTPHandleFunc, ids facade4datatug.IDGenerator)

RegisterHttpRoutes registers the DataTug module's HTTP routes.

ids is the host's adapter for the domain's IDGenerator port; the host supplies it at composition time (sneat-go/pkg/modules/datatug).

Route paths are literal: the host mounts them verbatim, with no module-id or /v0/ prefix added. This is the path the datatug-apps client already calls.

Types

type CreateProjectRequest

type CreateProjectRequest struct {
	StoreID string `json:"-"`
	Title   string `json:"title"`
}

CreateProjectRequest is the body of a create-project request. The store is taken from the `?store=` query parameter (the same shape the datatug CLI agent's create_project endpoint uses), so it is not part of the JSON body.

func (CreateProjectRequest) Validate

func (v CreateProjectRequest) Validate() error

Validate validates the request.

type CreateProjectResponse

type CreateProjectResponse struct {
	ID string `json:"id"`
}

CreateProjectResponse is the response of a successful create-project call.

Jump to

Keyboard shortcuts

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