Help us shape the future of Go! Take the 2026 Go Developer Survey

protocol

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package protocol defines the JSON contract between Questlock and its clients.

Index

Constants

View Source
const MaxContentBytes = 1 << 20

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Scope     string `json:"scope"`
	Key       string `json:"key"`
	Version   int64  `json:"version"`
	Content   string `json:"content"`
	UpdatedAt string `json:"updated_at"`
}

type AuditEvent

type AuditEvent struct {
	ID              int64  `json:"id"`
	AgentID         string `json:"agent_id"`
	Scope           string `json:"scope"`
	Key             string `json:"key"`
	OperationID     string `json:"operation_id"`
	Outcome         string `json:"outcome"`
	ExpectedVersion int64  `json:"expected_version"`
	CurrentVersion  int64  `json:"current_version"`
	CreatedAt       string `json:"created_at"`
}

type ErrorBody

type ErrorBody struct {
	Code           string `json:"code"`
	Message        string `json:"message"`
	CurrentVersion int64  `json:"current_version,omitempty"`
}

type PublishRequest

type PublishRequest struct {
	Key             string `json:"key"`
	OperationID     string `json:"operation_id"`
	ExpectedVersion int64  `json:"expected_version"`
	Content         string `json:"content"`
}

type PublishResult

type PublishResult struct {
	Artifact Artifact `json:"artifact"`
	Replayed bool     `json:"replayed"`
}

Jump to

Keyboard shortcuts

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