github.com/puellanivis/breton@v0.2.16/lib/os/user/harness_windows.go (about)

     1  // Code generated by Uses Names with Id instead of ID. DO NOT EDIT.
     2  // The above line skips linter because we use functions with the name Id instead of ID, but the linter refuses to allow this.
     3  // Copyright 2011 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  package user
     8  
     9  // Current returns the current user.
    10  func Current() (*User, error) {
    11  	return current()
    12  }
    13  
    14  // Lookup looks up a user by username. If the user cannot be found, the
    15  // returned error is of type UnknownUserError.
    16  func Lookup(username string) (*User, error) {
    17  	return lookupUser(username)
    18  }
    19  
    20  // LookupId looks up a user by userid. If the user cannot be found, the
    21  // returned error is of type UnknownUserIdError.
    22  func LookupId(uid string) (*User, error) {
    23  	return lookupUserId(uid)
    24  }
    25  
    26  // LookupGroup looks up a group by name. If the group cannot be found, the
    27  // returned error is of type UnknownGroupError.
    28  func LookupGroup(name string) (*Group, error) {
    29  	return lookupGroup(name)
    30  }
    31  
    32  // LookupGroupId looks up a group by groupid. If the group cannot be found, the
    33  // returned error is of type UnknownGroupIdError.
    34  func LookupGroupId(gid string) (*Group, error) {
    35  	return lookupGroupId(gid)
    36  }