Documentation
¶
Overview ¶
Package fsquota provides functions for working with filesystem quotas
Index ¶
- Constants
- func GroupQuotasSupported(path string) (supported bool, err error)
- func UserQuotasSupported(path string) (supported bool, err error)
- func VersionString() string
- type Info
- func GetGroupInfo(path string, group *user.Group) (info *Info, err error)
- func GetUserInfo(path string, user *user.User) (info *Info, err error)
- func SetGroupQuota(path string, group *user.Group, limits *Limits) (info *Info, err error)
- func SetUserQuota(path string, user *user.User, limits *Limits) (info *Info, err error)
- type Limit
- type Limits
- type Report
Constants ¶
const VersionMajor = 0
VersionMajor is the Major version
const VersionMinor = 1
VersionMinor is the Minor version
const VersionPatch = 2
VersionPatch is the Patch version
Variables ¶
This section is empty.
Functions ¶
func GroupQuotasSupported ¶ added in v0.1.3
GroupQuotasSupported checks if group quotas are supported on a given path
func UserQuotasSupported ¶ added in v0.1.3
UserQuotasSupported checks if quotas are supported on a given path
Types ¶
type Info ¶
type Info struct { Limits // Byte usage BytesUsed uint64 `json:"bytes_used"` // File usage FilesUsed uint64 `json:"files_used"` }
Info contains quota information
func GetGroupInfo ¶
GetGroupInfo retrieves a group's quota information
func GetUserInfo ¶
GetUserInfo retrieves a user's quota information
func SetGroupQuota ¶
SetGroupQuota configures a group's quota
type Limit ¶
type Limit struct {
// contains filtered or unexported fields
}
Limit represents a combined hard and soft limit
func (*Limit) MarshalJSON ¶ added in v0.1.5
MarshalJSON marshals a Limit struct
type Limits ¶
type Limits struct { // Byte usage limits Bytes Limit `json:"bytes"` // File count limits Files Limit `json:"files"` }
Limits contains quota limits
type Report ¶
Report contains a quota report
func GetGroupReport ¶
GetGroupReport retrieves a report of all group quotas present at the given path
func GetUserReport ¶
GetUserReport retrieves a report of all user quotas present at the given path