share

package
v0.9.2 Latest Latest
Warning

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

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

Documentation

Overview

Package share issues revocable read-only share links — show your traffic to a cofounder or investor without giving them a login. Tokens are 128-bit random, stored ONLY as sha256 hashes (a leaked sidecar file can't mint access), and scope to the web overview: no actions, no settings, no raw events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	ID      string    `json:"id"`
	Name    string    `json:"name"` // who it's for, e.g. "investor update"
	Hash    string    `json:"hash"` // sha256(token), hex
	Created time.Time `json:"created"`
}

Link is one share grant (the raw token is returned once at creation, never stored).

type Store

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

func Open

func Open(p string) (*Store, error)

func (*Store) Create

func (s *Store) Create(name string) (Link, string, error)

Create mints a link and returns it with the RAW token — shown once, never stored.

func (*Store) Delete

func (s *Store) Delete(id string) error

func (*Store) List

func (s *Store) List() []Link

func (*Store) Verify

func (s *Store) Verify(token string) bool

Verify reports whether a presented token matches any live link.

Jump to

Keyboard shortcuts

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