items

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package items provides API operations for Truestamp items.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateItemResponse

type CreateItemResponse struct {
	ID         string
	State      string
	ClaimsHash string
	ItemHash   string
	Visibility string
	Tags       []string
	TeamID     string
	Name       string
	Hash       string
	HashType   string
}

CreateItemResponse holds the parsed JSON:API response for a created item.

func CreateItem

func CreateItem(apiURL, apiKey, team string, claims map[string]any, visibility string, tags []string) (*CreateItemResponse, error)

CreateItem calls CreateItemCtx with context.Background.

func CreateItemCtx added in v0.3.0

func CreateItemCtx(ctx context.Context, apiURL, apiKey, team string, claims map[string]any, visibility string, tags []string) (*CreateItemResponse, error)

CreateItemCtx sends a JSON:API POST request to create a new item. claims is the nested claims map (hash, hash_type, name, etc.); visibility and tags are top-level item attributes. ctx cancels the in-flight request.

Jump to

Keyboard shortcuts

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