commands

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMultipleConsistencies = errors.New("provided multiple consistency flags")

Functions

func GetCaveatContext

func GetCaveatContext(cmd *cobra.Command) (*structpb.Struct, error)

GetCaveatContext returns the entered caveat caveat, if any.

func ParseCaveatContext

func ParseCaveatContext(contextString string) (*structpb.Struct, error)

ParseCaveatContext parses the given context JSON string into caveat context, if valid.

func ParseSubject

func ParseSubject(s string) (namespace, id, relation string, err error)

ParseSubject parses the given subject string into its namespace, object ID and relation, if valid.

func ParseType

func ParseType(s string) (namespace, relation string)

ParseType parses a type reference of the form `namespace#relaion`.

func PrettyProto

func PrettyProto(m proto.Message) ([]byte, error)

PrettyProto returns the given protocol buffer formatted into pretty text.

func ReadSchema

func ReadSchema(client client.Client) (string, error)

ReadSchema calls read schema for the client and returns the schema found.

func RegisterPermissionCmd

func RegisterPermissionCmd(rootCmd *cobra.Command) *cobra.Command

func RegisterRelationshipCmd

func RegisterRelationshipCmd(rootCmd *cobra.Command) *cobra.Command

func RegisterSchemaCmd

func RegisterSchemaCmd(rootCmd *cobra.Command) *cobra.Command

Types

This section is empty.

Jump to

Keyboard shortcuts

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