access

package
v0.0.0-...-4eea697 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionGrant    = "grant"
	ActionRestrict = "restrict"
)

Variables

This section is empty.

Functions

func ExtractWithGroupKey

func ExtractWithGroupKey(item *Item, groupKey *chachaPoly.Key) error

func ExtractWithUserKey

func ExtractWithUserKey(item *Item, userPubKey, userPrivKey *[32]byte) error

func LevelToString

func LevelToString(l Level) string

Types

type Item

type Item struct {
	ID     []byte
	Key    *chachaPoly.Key
	Level  string
	Fields map[string][]byte
}

type Kind

type Kind = uint8
const (
	NoKind Kind = iota
	Doc
	DocGroup
	UserGroup
)

func KindFromString

func KindFromString(str string) Kind

type Level

type Level = uint8
const (
	NoAccess Level = iota
	Owner
	Admin
	Read
)

func LevelFromString

func LevelFromString(str string) Level

type List

type List []*Item

Jump to

Keyboard shortcuts

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