domain

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: GPL-3.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	FileServerStatusHealthy = "healthy"
	FileServerStatusStale   = "stale"
)

Represents a fileserver stores add and usercount

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL struct {
	Owner  string // user who owns this root
	Shared []string
}

Access Control List

type FID

type FID struct {
	FileServerID     string
	InodeID          uint64
	GenerationNumber uint64
}

FID represents a File Identifier

func FIDFromProto

func FIDFromProto(pbFID *pb.FID) *FID

FIDFromProto creates domain FID from protobuf FID

func (*FID) String

func (f *FID) String() string

String returns string representation of FID

func (*FID) ToProto

func (f *FID) ToProto() *pb.FID

ToProto converts domain FID to protobuf FID

type FileServerInfo

type FileServerInfo struct {
	Address           string `json:"address"`
	UserCount         int    `json:"user_count"`
	LastHeartbeatUnix int64  `json:"last_heartbeat_unix,omitempty"`
	Status            string `json:"status,omitempty"`
}

type Inode

type Inode struct {
	FID      *FID
	Type     InodeType
	Name     string
	OSPath   string
	ACL      ACL
	Children []*FID // for directories
	Size     uint64 // for files
	Parent   *Inode
}

Inode represents a file or directory

type InodeType

type InodeType int

InodeType represents file or directory

const (
	InodeTypeFile InodeType = iota
	InodeTypeDirectory
)

func InodeTypeFromProto

func InodeTypeFromProto(pbType pb.InodeType) InodeType

InodeTypeFromProto converts from protobuf type

func (InodeType) String

func (t InodeType) String() string

String returns string representation

func (InodeType) ToProto

func (t InodeType) ToProto() pb.InodeType

ToProto converts to protobuf type

Jump to

Keyboard shortcuts

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