identity_store

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: Apache-2.0 Imports: 4 Imported by: 6

Documentation

Overview

Package identity_store provides the tooling to build the Raito identity store import files. Simply use the NewIdentityStoreFileCreator function by passing in the config coming from the CLI to create the necessary files. The returned IdentityStoreFileCreator can then be used (using the AddUsers and AddGroups functions) to write the users and groups to the right file. Make sure to call the Close function on the creator at the end (tip: use defer).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	ExternalId             string                 `json:"externalId"`
	Name                   string                 `json:"name"`
	DisplayName            string                 `json:"displayName"`
	Description            string                 `json:"description"`
	ParentGroupExternalIds []string               `json:"parentGroupExternalIds"`
	Tags                   map[string]interface{} `json:"tags"`
}

Group represents a user group in the format that is suitable to be imported into a Raito identity store.

type IdentityStoreFileCreator

type IdentityStoreFileCreator interface {
	AddGroups(groups []Group) error
	AddUsers(users []User) error
	Close()
	GetUserCount() int
	GetGroupCount() int
}

IdentityStoreFileCreator describes the interface for easily creating the user and group import files to be imported by the Raito CLI.

func NewIdentityStoreFileCreator

func NewIdentityStoreFileCreator(config *identity_store.IdentityStoreSyncConfig) (IdentityStoreFileCreator, error)

NewIdentityStoreFileCreator creates a new IdentityStoreFileCreator based on the configuration coming from the Raito CLI.

type User

type User struct {
	ExternalId       string                 `json:"externalId"`
	Name             string                 `json:"name"`
	UserName         string                 `json:"userName"`
	Email            string                 `json:"email"`
	GroupExternalIds []string               `json:"groupExternalIds"`
	Tags             map[string]interface{} `json:"tags"`
}

User represents a user in the format that is suitable to be imported into a Raito identity store.

Jump to

Keyboard shortcuts

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