stats

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectType

type ObjectType struct {
	ObjCount  int32     `json:"_obj_count,omitempty"`
	Count     int32     `json:"_count,omitempty"`
	Relations Relations `json:"relations,omitempty"`
}

type ObjectTypes

type ObjectTypes map[model.ObjectName]*ObjectType

type Relation

type Relation struct {
	Count        int32        `json:"_count,omitempty"`
	SubjectTypes SubjectTypes `json:"subject_types,omitempty"`
}

type Relations

type Relations map[model.RelationName]*Relation

type Stats

type Stats struct {
	ObjectTypes ObjectTypes `json:"object_types,omitempty"`
}

func NewStats

func NewStats() *Stats

func (*Stats) ObjectRefCount

func (s *Stats) ObjectRefCount(on model.ObjectName) int32

func (*Stats) RelationRefCount

func (s *Stats) RelationRefCount(on model.ObjectName, rn model.RelationName) int32

func (*Stats) RelationSubjectCount

func (s *Stats) RelationSubjectCount(on model.ObjectName, rn model.RelationName, sn model.ObjectName, sr model.RelationName) int32

type SubjectRelation

type SubjectRelation struct {
	Count int32 `json:"_count,omitempty"`
}

type SubjectRelations

type SubjectRelations map[model.RelationName]*SubjectRelation

type SubjectType

type SubjectType struct {
	Count            int32            `json:"_count,omitempty"`
	SubjectRelations SubjectRelations `json:"subject_relations,omitempty"`
}

type SubjectTypes

type SubjectTypes map[model.ObjectName]*SubjectType

Jump to

Keyboard shortcuts

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