types

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: GPL-3.0, LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package types provides types for the users package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateGroupEntries

func ValidateGroupEntries(groups []GroupEntry) error

ValidateGroupEntries validates a list of group entries, ensuring they respect the GroupEntry.Validate constraints and that the names and the GID are unique.

Types

type GroupEntry

type GroupEntry struct {
	Name   string
	GID    uint32
	Users  []string
	Passwd string
}

GroupEntry is the group information sent to the NSS service.

func DeepCopyGroupEntries

func DeepCopyGroupEntries(groups []GroupEntry) []GroupEntry

DeepCopyGroupEntries makes a deep copy of group entries.

func GetValidGroupEntries

func GetValidGroupEntries(groups []GroupEntry) (validEntries []GroupEntry)

GetValidGroupEntries returns the first valid group entries according to validates a list of group entries, ensuring they respect the GroupEntry.Validate constraints and that the names and the GID are unique.

func (GroupEntry) DeepCopy

func (g GroupEntry) DeepCopy() GroupEntry

DeepCopy makes a deep copy of the group entry.

func (GroupEntry) Equals

func (g GroupEntry) Equals(other GroupEntry) bool

Equals checks that two groups are equal.

func (GroupEntry) String

func (g GroupEntry) String() string

func (GroupEntry) Validate

func (g GroupEntry) Validate() error

Validate validates the group entry values.

type GroupInfo

type GroupInfo struct {
	Name string
	GID  *uint32
	UGID string
}

GroupInfo is the group information returned by the broker.

func (GroupInfo) Equals

func (u GroupInfo) Equals(other GroupInfo) bool

Equals checks that two groups are equal.

type ShadowEntry

type ShadowEntry struct {
	Name           string
	LastPwdChange  int
	MaxPwdAge      int
	PwdWarnPeriod  int
	PwdInactivity  int
	MinPwdAge      int
	ExpirationDate int
}

ShadowEntry is the shadow information sent to the NSS service.

type UserEntry

type UserEntry struct {
	Name  string
	UID   uint32
	GID   uint32
	Gecos string
	Dir   string
	Shell string
}

UserEntry is the user information sent to the NSS service.

type UserInfo

type UserInfo struct {
	Name  string
	UID   uint32
	Gecos string
	Dir   string
	Shell string

	Groups []GroupInfo
}

UserInfo is the user information returned by the broker.

func (UserInfo) Equals

func (u UserInfo) Equals(other UserInfo) bool

Equals checks that two users are equal.

Jump to

Keyboard shortcuts

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