Delete unused internal/users package
This is a leftover from the `osbuild/images` split`. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
ec6cff5223
commit
0d9a8df0f8
1 changed files with 0 additions and 40 deletions
|
|
@ -1,40 +0,0 @@
|
|||
package users
|
||||
|
||||
import "github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||
|
||||
type User struct {
|
||||
Name string
|
||||
Description *string
|
||||
Password *string
|
||||
Key *string
|
||||
Home *string
|
||||
Shell *string
|
||||
Groups []string
|
||||
UID *int
|
||||
GID *int
|
||||
}
|
||||
|
||||
type Group struct {
|
||||
Name string
|
||||
GID *int
|
||||
}
|
||||
|
||||
func UsersFromBP(userCustomizations []blueprint.UserCustomization) []User {
|
||||
users := make([]User, len(userCustomizations))
|
||||
for idx := range userCustomizations {
|
||||
// currently, they have the same structure, so we convert directly
|
||||
// this will fail to compile as soon as one of the two changes
|
||||
users[idx] = User(userCustomizations[idx])
|
||||
}
|
||||
return users
|
||||
}
|
||||
|
||||
func GroupsFromBP(groupCustomizations []blueprint.GroupCustomization) []Group {
|
||||
groups := make([]Group, len(groupCustomizations))
|
||||
for idx := range groupCustomizations {
|
||||
// currently, they have the same structure, so we convert directly
|
||||
// this will fail to compile as soon as one of the two changes
|
||||
groups[idx] = Group(groupCustomizations[idx])
|
||||
}
|
||||
return groups
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue