models

package
v0.0.0-...-31fc120 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Built-in models projected from events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL interface {
	Roles
	Docs() map[string]Roles
}

ACL defines the access roles for a thread and its docs.

type Metadata

type Metadata interface {
	// The max age of an event after which it can be discarded.
	MaxAge() time.Duration

	// The max count of events in a thread after which the oldest can be discarded.
	MaxCount() int
}

Metadata holds info pertaining to event retention.

type Role

type Role int

Role represents a peer access role.

const (
	// NOACCESS is granted.
	NOACCESS Role = iota
	// FOLLOW access is granted.
	FOLLOW
	// FOLLOW and READ access is granted.
	READ
	// WRITE access is granted.
	WRITE
	// DELETE access is granted.
	DELETE
)

type Roles

type Roles interface {
	// Default holds a default Role for all peers.
	Default() Role

	// Peers holds Roles for specific peers.
	Peers() map[peer.ID]Role
}

Roles defines the default and peer-based access roles for a thread / doc.

Jump to

Keyboard shortcuts

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