// Generated by Lisette bindgen
// Source: os/user (Go stdlib)
// Go: 1.25.5
// Lisette: 0.1.14

pub fn Current() -> Result<Ref<User>, error>

pub fn Lookup(username: string) -> Result<Ref<User>, error>

pub fn LookupGroup(name: string) -> Result<Ref<Group>, error>

pub fn LookupGroupId(gid: string) -> Result<Ref<Group>, error>

pub fn LookupId(uid: string) -> Result<Ref<User>, error>

/// Group represents a grouping of users.
/// 
/// On POSIX systems Gid contains a decimal number representing the group ID.
pub struct Group {
  pub Gid: string,
  pub Name: string,
}

/// UnknownGroupError is returned by [LookupGroup] when
/// a group cannot be found.
pub struct UnknownGroupError(string)

/// UnknownGroupIdError is returned by [LookupGroupId] when
/// a group cannot be found.
pub struct UnknownGroupIdError(string)

/// UnknownUserError is returned by [Lookup] when
/// a user cannot be found.
pub struct UnknownUserError(string)

/// UnknownUserIdError is returned by [LookupId] when a user cannot be found.
pub struct UnknownUserIdError(int)

/// User represents a user account.
pub struct User {
  pub Uid: string,
  pub Gid: string,
  pub Username: string,
  pub Name: string,
  pub HomeDir: string,
}

impl UnknownGroupError {
  fn Error(self) -> string
}

impl UnknownGroupIdError {
  fn Error(self) -> string
}

impl UnknownUserError {
  fn Error(self) -> string
}

impl UnknownUserIdError {
  fn Error(self) -> string
}

impl User {
  /// GroupIds returns the list of group IDs that the user is a member of.
  fn GroupIds(self: Ref<User>) -> Result<Slice<string>, error>
}
