models

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KITLDAPTimestampLayout = "20060102150405Z" // RFC 4517 format
)
View Source
const (
	PADDING = 3
)

Variables

View Source
var (
	TermWidth int
)

Functions

func FormatTimeStamp

func FormatTimeStamp(timestamp *time.Time) string

func JSONPrintGroups

func JSONPrintGroups(groups []Group)

func JSONPrintGroupsWithMembers

func JSONPrintGroupsWithMembers(groups []GroupWithMembers)

func LimitedWidthString added in v0.3.6

func LimitedWidthString(s string, maxLength int) string

func PrettyPrintGroups

func PrettyPrintGroups(groups []Group)

func PrettyPrintGroupsWithMembers

func PrettyPrintGroupsWithMembers(groups []GroupWithMembers)

Types

type BasicLDAPAttributes

type BasicLDAPAttributes struct {
	ObjectClass     []string   `json:"-" cbor:"keyasint,omitempty,omitzero"`
	CreateTimestamp *time.Time `json:"-"`
	ModifyTimestamp *time.Time `json:"modifyTimestamp,omitempty"`
	DN              string     `json:"dn,omitempty"`
	CN              string     `json:"cn,omitempty"`
}

func (*BasicLDAPAttributes) ParseBasicLDAPAttributes

func (result *BasicLDAPAttributes) ParseBasicLDAPAttributes(entry *ldap.Entry) error

type Group

type Group struct {
	BasicLDAPAttributes
	Description string   `json:"description,omitempty"`
	MemberUIDs  []string `json:"memberUid,omitempty"`
}

func (*Group) ParseGroup

func (g *Group) ParseGroup(entry *ldap.Entry) error

type GroupWithMembers

type GroupWithMembers struct {
	Group   Group  `json:"group"`
	Members []User `json:"members"`
}

type User

type User struct {
	BasicLDAPAttributes
	DisplayName string `json:"displayName,omitempty"`
	KitEppn     string `json:"kitEppn,omitempty"`
	EMail       string `json:"mail,omitempty"`
}

func (*User) ParseUser

func (result *User) ParseUser(entry *ldap.Entry) error

Source Files

  • constants.go
  • ldap-basic-attr.go
  • ldap-group.go
  • ldap-user.go

Jump to

Keyboard shortcuts

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