bibleit

package module
v0.0.1 Latest Latest
Warning

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

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

README

Bibleit Go client

A dependency-free Go client for Bibleit Server protocol v1. Import it as:

import bibleit "github.com/bibleit-labs/bibleit-go"

This module is released independently from bibleit-cli. It requires Go 1.27.1. The CLI imports this library; the library does not depend on the CLI or its credential configuration. Python, Ruby, and Rust clients have separate repositories.

Source pushes and private CI are authorized. Customer releases and tags remain paused; use the checkout for development. No release version is available yet. The project-managed service address is currently https://bibleit.app. HTTPS certificate verification is enabled. Applications cannot override it through configuration or environment variables. The custom-domain cutover is being qualified; customer release remains paused.

Usage

client, err := bibleit.NewClient(apiToken)
if err != nil {
    return err
}
result, err := client.Read(ctx, bibleit.Reference{
    Translation: "web",
    Book: "Song of Songs",
    Chapter: 2,
    Verse: 1,
})
if err != nil {
    return err
}
for _, record := range result.Records {
    fmt.Println(record.Fields["text"])
}

Read, Search, Ping, Identity, and ListTranslations provide convenient methods. GetServerInfo, Help(ctx, topic), GetAccountInfo, and ListQuotas return typed results. Use an empty help topic for root discovery; the server filters discovery by the authenticated principal's authority.

Each typed result retains Raw, including original wire records and unknown fields. Quota entries expose a QuotaLimit: zero is a finite limit, while Unlimited is explicit. Counts are non-negative 64-bit integers; malformed numbers and mismatched record counts fail rather than becoming zero. Account notification preferences remain opaque Erlang-term text in the raw fields.

Other customer operations use validated command builders:

command, err := bibleit.CreateLiveCommand("Sunday Service")
if err != nil {
    return err
}
result, err := client.Execute(ctx, command)

Builders cover account translation add/remove, Live lifecycle and settings, secrets, and stack operations. They expose no arbitrary protocol constructor. Command.String() exists for transport adapters and may contain a Live secret; do not log it indiscriminately.

Behavior and current limits

  • Credentials are explicit. The endpoint is the project-owned ServerEndpoint constant; no constructor or environment override is provided. The client does not access CLI credentials, launch a browser, or load API tokens or service addresses from environment variables. HTTP transport/proxy behavior is owned by net/http or the supplied transport.
  • The fixed production HTTPS origin is https://bibleit.app. Standard certificate verification is enabled; remote HTTP remains rejected.
  • The default HTTP timeout is 15 seconds. Use NewClientWithHTTPClient or NewAuthClientWithHTTPClient with a *http.Client to customize transport and timeouts. Its value is copied and redirects are disabled; its Transport and Jar remain shared. An explicit custom client controls its own timeout.
  • Commands are limited to 8192 bytes and JSON request bodies to 16384 bytes, matching the reviewed server. Oversized requests fail before network access.
  • All requests accept a context. Operations are never retried automatically.
  • Responses retain wire lines and parsed records. V1 field values remain strings, and unknown fields are retained in the typed models.
  • *ServerError retains unknown error codes and metadata. Use errors.As and RetryAfter() for rate-limit information. *HTTPError reports HTTP failures that do not provide a usable protocol error; JSON error codes and metadata are retained.
  • Catalogue chapter Verses is the highest source verse identifier. Some editions omit numbers: ReadVerses returns verse_not_found for an omitted verse, while chapter reads include only present rows. Source numbering remains unchanged.
  • Finite responses are limited to 2 MiB; oversized and incomplete responses fail explicitly.
  • The HTTP transport rejects subscriptions with streaming_requires_ssh. OpenSSH execution and subscriptions remain CLI adapters in this increment.
  • The server's request tokenizer supports quoted whitespace but not embedded double quotes. Builders reject double quotes, CR, LF, and NUL. Backslashes are preserved literally in requests; response strings use escaped quotes, backslashes and escaped control characters. Response escaping is not a request escape syntax. The verified server rejects malformed quote segments, empty quoted arguments and attempted escaped embedded quotes with bad_command. Live secrets are server-generated through CREATE/ROTATE; custom SECRET SET remains unsupported and is rejected by the client.
  • Browser orchestration and credential persistence remain in the CLI; code exchange and revocation use library methods.

Run go test ./... from the repository root. Shared response fixtures live in contract/fixtures/responses-v1.json; see contract/README.md for their schema.

Translation metadata and reference catalogue

GetTranslationInfo(ctx, slug) returns the short/full name, edition, update label, rights status/label/URLs, attribution and trademark notice where supplied. Optional fields stay empty when omitted; unknown fields remain in Raw.

GetTranslationCatalog(ctx, slug) returns ordered books and their chapters with verse counts. CatalogBook.ID is the server book identifier, not an array position. IDs and chapter numbers may be sparse. Names are supplied by the server and can be localized. Use the returned ID or name when constructing a Reference. The catalogue describes installed indexed data; metadata availability alone does not imply installation or enablement in the personal translation library.

The typed parser checks book/chapter counts, parent IDs, duplicate IDs/numbers and positive chapter/verse values. It retains unknown book/chapter fields. Raw Execute remains available for callers inspecting newer protocol shapes.

Real-server metadata and catalogue verification pass. The assessment session fixed an encoder mismatch between atom and binary field names; shared encoder fixtures now cover binary metadata keys as well.

For example, use the catalogue to inspect the references actually installed:

catalog, err := client.GetTranslationCatalog(ctx, "web")
if err != nil {
    return err
}
for _, book := range catalog.Books {
    for _, chapter := range book.Chapters {
        fmt.Printf("%d %s %d:1-%d\n",
            book.ID, book.Name, chapter.Number, chapter.Verses)
    }
}

Typed identity, reading and Live results

Raw Identity, Read, Search and Execute remain available. These additive methods return domain models and retain Raw/Fields for original records and future fields:

Method Result
GetIdentity Actor, display identity/provider, roles, permissions, SSH fingerprint
ReadVerses / SearchVerses Translation, optional response coordinates and verse texts
CreateLive / GetLive / SetLive Live state and optional management metadata
ListLives Ordered Live states
GetLiveStats Revision, duration, stack counts and connection details
GetLiveStack Ordered entries with positions and verse payloads
PushLive / PopLive Verse payload or clear acknowledgement
ControlLive Start/stop state, pause/resume flag, clear/delete event

Reading.Book/Chapter/Verse describe coordinates supplied by the response header. Chapter/book/search records supply text only; the client does not extract or invent per-verse coordinates from that text. Search coordinates are normally nil. Empty searches and stacks return empty slices.

LiveState.Owned, Protected, Owner, CreatedAt and other optional fields use pointers so absence differs from false, zero, or an empty string. Public Live list/create replies omit management metadata that owner INFO may supply. Unknown status, role, permission and access strings remain intact.

ControlLive accepts START, STOP, PAUSE, RESUME, CLEAR and DELETE only. Its result describes the server acknowledgement without a follow-up request. Push/pop preserve all verse entries, including repeated translation names in a stack. Decode failures after a mutation do not imply rollback; mutations are not retried.

The typed models reject malformed numeric/boolean fields, mismatched counts, duplicate Live IDs, inconsistent connection totals and invalid stack positions. The read example in examples/read now uses ReadVerses.

Typed token metadata

ListTokens(ctx) sends ACCOUNT TOKEN LIST and returns TokenList with the actor, ordered TokenMetadata entries and Raw. Entries expose ID, source, issuer, label, scopes, Unix-second issue/last-use/expiry timestamps and retirement status. Optional fields use pointers; absent scopes stay nil while an explicitly empty scope list means the credential inherits the actor's current permissions. Scopes describe a restriction, not a guarantee of effective permissions. Unknown source/permission names and fields remain available.

This is a list of currently active personal credentials, not a credential history: the server excludes revoked, expired and expired rotation-grace tokens. The endpoint returns metadata only, never bearer values. Token creation, rotation and revocation are not added by this increment.

The client validates record counts/types, unique IDs and numeric/boolean values. Response control-character escapes are decoded without splitting a label into protocol records. Requests retain their existing, stricter quoting rules.

The assessment fixed the scoped-token encoder to use permission CSV. Real HTTP verification now covers manual and scoped credentials, restricted-list denial, labels with escaped controls, and expired/revoked credential exclusion.

Authorization transport

Use NewAuthClient() before a bearer credential exists. The application owns PKCE verifier generation, browser authorization, callback-state validation and storage. Then exchange the approved code:

auth, err := bibleit.NewAuthClient()
if err != nil {
    return err
}
credential, err := auth.ExchangeCode(ctx, bibleit.CodeExchange{
    Code: code, Verifier: verifier, DeviceName: "My application",
})
if err != nil {
    return err
}
client, err := bibleit.NewClient(credential.AccessToken)
if err != nil {
    return err
}
// Later, explicitly revoke this credential:
err = client.RevokeCredential(ctx)

AuthorizationResult preserves actor, identity/provider, token ID, bearer value and unknown JSON fields. Its Fields also includes the bearer value. Applications must decide how to store it and avoid logging the result.

Both transports share endpoint validation, a copied HTTP client, default timeout and redirect rejection. Methods accept contexts, limit response bodies to 2 MiB, and never retry. Exchange forms are limited to the server's 16384-byte limit. Omitting DeviceName selects the server default label. HTTP errors retain status, error code and JSON/protocol metadata; use errors.As with *HTTPError.

A code is one-use, and even an invalid verifier consumes it on the current server. RevokeCredential succeeds only on HTTP 204. It does not erase local credentials or modify the client; another request after revocation is expected to fail. The CLI keeps credentials when logout fails and clears an already unauthorized credential or one whose revocation was acknowledged.

Real HTTP checks cover successful exchange/use, replay rejection, bad-verifier consumption, revocation and post-revocation authentication rejection.

Contributing and license

This is a public open source project. See CONTRIBUTING.md for development, validation, Conventional Commits and release expectations. The client is distributed under the MIT license.

Fixed service address and local development

Commands, browser-code exchange, and revocation construct requests at the same project-managed service. The optional HTTP client still configures transport and timeouts; it does not add a service URL option. Redirects remain blocked. The server repository stays separate and private. Future Python, Ruby and Rust clients follow the same fixed-service policy.

Tests use in-memory transports. Real-server integration uses the public constructors and a disposable server at the fixed endpoint; client URLs and destinations are not overridden. Keep this checkout beside bibleit-cli and use a local workspace while the client remains unreleased. Source branches may be pushed to the private repository; customer release tags and releases remain gated on production readiness.

API token and custom HTTP transport

Use the term API token for the bearer credential supplied to this client. It matches the server's scoped, expiring token resources. NewClient(apiToken) returns (*Client, error) and rejects invalid credentials before network access. The API token is kept private; constructor errors do not include its value.

For HTTP transport or timeout customization, use NewClientWithHTTPClient(apiToken, httpClient) or NewAuthClientWithHTTPClient(httpClient). The supplied client is copied, redirects are blocked, and the service endpoint remains fixed. No operation is retried. This keeps the ordinary constructor to a single credential argument, inspired by Resend's constructor pattern.

To run real-server checks while the host service is using port 8080, use the CLI's python3 ../bibleit-cli/scripts/check_server_container.py. That runner builds a frozen source snapshot in an isolated container namespace with its own temporary database; it does not expose host ports or require client endpoint configuration.

Documentation

Overview

Package bibleit provides a client for Bibleit Server protocol v1. It does not read CLI configuration, open browsers, or manage credentials.

Index

Constants

View Source
const MaxCommandBytes = 8192
View Source
const MaxRequestBytes = 16384
View Source
const ServerEndpoint = "https://bibleit.app"

ServerEndpoint is the project-managed Bibleit service address. Applications cannot override it through configuration or environment variables. HTTPS certificate verification is enabled by the default transport.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountInfo

type AccountInfo struct {
	Actor, DisplayName, Handle, AvatarURL, Locale, Theme string
	Plan, PlanName, PlanSource                           string
	PlanActivatedAt                                      int64
	Lives, Translations, Tokens, Keys                    int64
	Raw                                                  Response
}

type AuthClient

type AuthClient struct {
	// contains filtered or unexported fields
}

AuthClient exchanges an approved browser code. It does not run a browser, validate callback state, persist credentials, or retry a consumed code.

func NewAuthClient

func NewAuthClient() (*AuthClient, error)

NewAuthClient creates an unauthenticated client for browser-code exchange.

func NewAuthClientWithHTTPClient

func NewAuthClientWithHTTPClient(httpClient *http.Client) (*AuthClient, error)

NewAuthClientWithHTTPClient configures transport/timeouts for code exchange at the same fixed service endpoint. It copies the supplied HTTP client.

func (*AuthClient) ExchangeCode

func (c *AuthClient) ExchangeCode(ctx context.Context, exchange CodeExchange) (AuthorizationResult, error)

ExchangeCode redeems an approved one-use code with its PKCE verifier. Even a rejected verifier can consume the code on the current server.

type AuthorizationResult

type AuthorizationResult struct {
	Actor, IdentityName, DisplayName, AuthProvider, TokenID, AccessToken string
	Fields                                                               map[string]json.RawMessage
}

AuthorizationResult contains a secret AccessToken; Fields also contains the original JSON response, including that secret. Callers own secure storage.

type CatalogBook

type CatalogBook struct {
	ID       int64 // Server source book identifier; not the book's position in Books.
	Name     string
	Chapters []CatalogChapter
	Fields   map[string]string
}

type CatalogChapter

type CatalogChapter struct {
	Number int64
	// Verses is the highest source verse identifier, not the number of present
	// rows. Editions may omit identifiers; reading an omitted verse fails.
	Verses int64
	Fields map[string]string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiToken string) (*Client, error)

NewClient creates a client using an API token and the project-managed service. The default HTTP timeout is 15 seconds. Operations are never retried automatically.

func NewClientWithHTTPClient

func NewClientWithHTTPClient(apiToken string, httpClient *http.Client) (*Client, error)

NewClientWithHTTPClient configures HTTP transport/timeouts while retaining the fixed service endpoint. The supplied HTTP client is copied and redirects blocked.

func (*Client) ControlLive

func (c *Client) ControlLive(ctx context.Context, id string, action LiveAction) (LiveActionResult, error)

func (*Client) CreateLive

func (c *Client) CreateLive(ctx context.Context, name string) (LiveResult, error)

func (*Client) Execute

func (c *Client) Execute(ctx context.Context, command Command) (Response, error)

func (*Client) GetAccountInfo

func (c *Client) GetAccountInfo(ctx context.Context) (AccountInfo, error)

func (*Client) GetIdentity

func (c *Client) GetIdentity(ctx context.Context) (IdentityInfo, error)

func (*Client) GetLive

func (c *Client) GetLive(ctx context.Context, id string) (LiveResult, error)

func (*Client) GetLiveStack

func (c *Client) GetLiveStack(ctx context.Context, id string) (LiveStack, error)

func (*Client) GetLiveStats

func (c *Client) GetLiveStats(ctx context.Context, id string) (LiveStatistics, error)

func (*Client) GetServerInfo

func (c *Client) GetServerInfo(ctx context.Context) (ServerInfo, error)

func (*Client) GetTranslationCatalog

func (c *Client) GetTranslationCatalog(ctx context.Context, slug string) (TranslationCatalog, error)

func (*Client) GetTranslationInfo

func (c *Client) GetTranslationInfo(ctx context.Context, slug string) (TranslationInfo, error)

func (*Client) Help

func (c *Client) Help(ctx context.Context, topic string) (HelpResult, error)

func (*Client) Identity

func (c *Client) Identity(ctx context.Context) (Response, error)

func (*Client) ListLives

func (c *Client) ListLives(ctx context.Context) (LiveList, error)

func (*Client) ListQuotas

func (c *Client) ListQuotas(ctx context.Context) (QuotaResult, error)

func (*Client) ListTokens

func (c *Client) ListTokens(ctx context.Context) (TokenList, error)

ListTokens lists active personal token metadata. The server filters expired, revoked and expired rotation-grace credentials; it does not return a history.

func (*Client) ListTranslations

func (c *Client) ListTranslations(ctx context.Context) (Response, error)

func (*Client) Ping

func (c *Client) Ping(ctx context.Context) (Response, error)

func (*Client) PopLive

func (c *Client) PopLive(ctx context.Context, id string, count int) (LiveVerseResult, error)

func (*Client) PushLive

func (c *Client) PushLive(ctx context.Context, id string, ref Reference) (LiveVerseResult, error)

func (*Client) Read

func (c *Client) Read(ctx context.Context, ref Reference) (Response, error)

func (*Client) ReadVerses

func (c *Client) ReadVerses(ctx context.Context, ref Reference) (Reading, error)

func (*Client) RevokeCredential

func (c *Client) RevokeCredential(ctx context.Context) error

RevokeCredential revokes this client's bearer credential via CLI logout. Only HTTP 204 is a successful acknowledgement; errors never mutate the client.

func (*Client) Search

func (c *Client) Search(ctx context.Context, translation, query string) (Response, error)

func (*Client) SearchVerses

func (c *Client) SearchVerses(ctx context.Context, translation, query string) (Reading, error)

func (*Client) SetLive

func (c *Client) SetLive(ctx context.Context, id string, field LiveField, values ...string) (LiveResult, error)

type CodeExchange

type CodeExchange struct {
	Code, Verifier, DeviceName string
}

type Command

type Command struct {
	// contains filtered or unexported fields
}

Command is a validated customer operation. Its zero value is invalid. String exposes the wire representation for transport adapters; it may contain secrets.

func AccountInfoCommand

func AccountInfoCommand() Command

func AccountQuotasCommand

func AccountQuotasCommand() Command

func AccountTokensCommand

func AccountTokensCommand() Command

func AddTranslationCommand

func AddTranslationCommand(slug string) (Command, error)

func CreateLiveCommand

func CreateLiveCommand(name string) (Command, error)

func DeleteAllLivesCommand

func DeleteAllLivesCommand() Command

func HelpCommand

func HelpCommand(topic string) (Command, error)

HelpCommand asks the server for commands visible to the current principal. An empty topic selects the root. The server decides permission visibility.

func IdentityCommand

func IdentityCommand() Command

func LiveCommand

func LiveCommand(id string, action LiveAction) (Command, error)

func LiveListCommand

func LiveListCommand() Command

func LiveSecretCommand

func LiveSecretCommand(id string, action SecretAction, value string) (Command, error)

func LiveStackCommand

func LiveStackCommand(id string, action StackAction) (Command, error)

func PingCommand

func PingCommand() Command

func PopLiveCommand

func PopLiveCommand(id string, count int) (Command, error)

func PushLiveCommand

func PushLiveCommand(id string, ref Reference) (Command, error)

func ReadCommand

func ReadCommand(ref Reference) (Command, error)

func RemoveTranslationCommand

func RemoveTranslationCommand(slug string) (Command, error)

func SearchCommand

func SearchCommand(translation, query string) (Command, error)

func ServerInfoCommand

func ServerInfoCommand() Command

func SetLiveCommand

func SetLiveCommand(id string, field LiveField, values ...string) (Command, error)

func TranslationCatalogCommand

func TranslationCatalogCommand(slug string) (Command, error)

func TranslationInfoCommand

func TranslationInfoCommand(slug string) (Command, error)

func TranslationListCommand

func TranslationListCommand() Command

func (Command) Streaming

func (c Command) Streaming() bool

func (Command) String

func (c Command) String() string

type HTTPError

type HTTPError struct {
	StatusCode int
	Code       string
	Fields     map[string]any
}

HTTPError represents a failure without a usable protocol error envelope.

func (*HTTPError) Error

func (e *HTTPError) Error() string

type HelpEntry

type HelpEntry struct {
	Usage, Summary string
	// Auth is "none" when the server omits the auth field.
	Auth   string
	Fields map[string]string
}

type HelpResult

type HelpResult struct {
	Authenticated bool
	Commands      []HelpEntry
	Raw           Response
}

type IdentityInfo

type IdentityInfo struct {
	Actor, DisplayName, IdentityName, AuthProvider, KeyFingerprint string
	Authenticated                                                  bool
	Roles, Permissions                                             []string
	Raw                                                            Response
}

type LiveAction

type LiveAction string
const (
	LiveInfo      LiveAction = "INFO"
	LiveStats     LiveAction = "STATS"
	LiveStart     LiveAction = "START"
	LiveStop      LiveAction = "STOP"
	LivePause     LiveAction = "PAUSE"
	LiveResume    LiveAction = "RESUME"
	LiveClear     LiveAction = "CLEAR"
	LiveDelete    LiveAction = "DELETE"
	LiveSubscribe LiveAction = "SUBSCRIBE"
)

type LiveActionResult

type LiveActionResult struct {
	State  *LiveState
	Paused *bool
	Event  string
	Raw    Response
}

LiveActionResult reflects the server acknowledgement without fetching state.

type LiveConnection

type LiveConnection struct {
	Actor, Access                    string
	ConnectedAt, ConnectedForSeconds int64
	Fields                           map[string]string
}

type LiveField

type LiveField string
const (
	LiveName         LiveField = "NAME"
	LiveReference    LiveField = "REFERENCE"
	LiveTranslations LiveField = "TRANSLATIONS"
)

type LiveList

type LiveList struct {
	Lives []LiveState
	Raw   Response
}

type LiveResult

type LiveResult struct {
	Live LiveState
	Raw  Response
}

type LiveStack

type LiveStack struct {
	ID      string
	Entries []StackEntry
	Raw     Response
}

type LiveState

type LiveState struct {
	ID, Name, Status                            string
	Paused                                      bool
	Reference, Owner, CreatedBy, OrganizationID *string
	Owned, Protected                            *bool
	CreatedAt                                   *int64
	Translations                                []string
	Fields                                      map[string]string
}

type LiveStatistics

type LiveStatistics struct {
	ID                                                                                string
	RunningForSeconds, Revision, StackEntries, ActorConnections, AnonymousConnections int64
	Connections                                                                       []LiveConnection
	Raw                                                                               Response
}

type LiveVerse

type LiveVerse struct {
	Translation, Reference, Text string
	Fields                       map[string]string
}

type LiveVerseResult

type LiveVerseResult struct {
	Event  string
	Verses []LiveVerse
	Raw    Response
}

type Quota

type Quota struct {
	Permission string
	Limit      QuotaLimit
	Used       int64
	Fields     map[string]string
}

type QuotaLimit

type QuotaLimit struct {
	Unlimited bool
	Value     int64 // Meaningful only when Unlimited is false.
}

type QuotaResult

type QuotaResult struct {
	Quotas []Quota
	Raw    Response
}

type Reading

type Reading struct {
	Translation string
	// Multi-verse/search replies do not supply per-verse coordinates.
	Book, Chapter, Verse *int64
	Verses               []VerseText
	Raw                  Response
}

type Record

type Record struct {
	Type   string
	Fields map[string]string
	Order  []string
}

Record preserves unknown v1 fields and their wire order.

func ParseRecord

func ParseRecord(line string) (Record, error)

ParseRecord decodes response quoting and escaping, rejecting truncated strings.

type Reference

type Reference struct {
	Translation string
	Book        string
	Chapter     int
	Verse       int
}

Reference identifies a book, chapter, or verse. Zero chapter/verse means omitted.

type RequestSizeError

type RequestSizeError struct {
	Part  string
	Bytes int
	Limit int
}

RequestSizeError reports a request rejected locally before any network call.

func (*RequestSizeError) Error

func (e *RequestSizeError) Error() string

type Response

type Response struct {
	Lines   []string
	Records []Record
}

Response retains original lines for CLI raw output. END is excluded. Protocol v1 fields remain strings; future typed models can build on Records.

func DecodeCommandResponse

func DecodeCommandResponse(command Command, reader io.Reader) (Response, error)

DecodeCommandResponse uses the command's framing contract for a finite reply. Account translation replies contain count but are single records without END.

func DecodeResponse

func DecodeResponse(reader io.Reader) (Response, error)

DecodeResponse decodes one finite HTTP or SSH-exec reply, requiring END for multi-record replies. It is not a decoder for a persistent SSH subscription.

type SecretAction

type SecretAction string
const (
	SecretAuthenticate SecretAction = ""
	SecretCreate       SecretAction = "CREATE"
	SecretRotate       SecretAction = "ROTATE"
	SecretDelete       SecretAction = "DELETE"
)

type ServerError

type ServerError struct {
	Code   string
	Fields map[string]string
}

ServerError preserves the server code and metadata, including unknown codes.

func (*ServerError) Error

func (e *ServerError) Error() string

func (*ServerError) RetryAfter

func (e *ServerError) RetryAfter() time.Duration

type ServerInfo

type ServerInfo struct {
	ProtocolVersion int64
	Version         string
	Capabilities    []string
	Raw             Response
}

Typed results retain Raw for unknown fields and original wire records.

type StackAction

type StackAction string
const (
	StackInfo  StackAction = "INFO"
	StackClear StackAction = "CLEAR"
)

type StackEntry

type StackEntry struct {
	Position int64
	LiveVerse
}

type TokenList

type TokenList struct {
	Actor  string
	Tokens []TokenMetadata
	Raw    Response
}

type TokenMetadata

type TokenMetadata struct {
	ID, Source      string
	IssuedAt        int64
	IssuedBy, Label *string
	// Empty scopes inherit the actor's permissions. Nil means the field was absent;
	// it must not be interpreted as unrestricted authority.
	Scopes                []string
	LastUsedAt, ExpiresAt *int64
	Retiring              *bool
	Fields                map[string]string
}

TokenMetadata describes a currently active personal credential, never its value. Timestamp fields are Unix seconds. Optional fields remain nil when absent.

type TranslationCatalog

type TranslationCatalog struct {
	Translation string
	Books       []CatalogBook
	Raw         Response
}

type TranslationInfo

type TranslationInfo struct {
	ShortName, FullName                             string
	Edition, Updated                                string
	RightsStatus, RightsLabel, RightsURL, SourceURL string
	Attribution, TrademarkNotice                    string
	Raw                                             Response
}

type VerseText

type VerseText struct {
	Text   string
	Fields map[string]string
}

Directories

Path Synopsis
examples
read command
Read a verse using explicit server credentials supplied by the application.
Read a verse using explicit server credentials supplied by the application.

Jump to

Keyboard shortcuts

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