Product Help

Generic Package Types

DataConnector

type DataConnector interface { RunQuery(ctx context.Context, q Query) (QueryResult, error) }

DataConnector is an interface for fetching data from a data source.

Account

type Account struct { ID string Name string Attrs map[string]interface{} }

Account has just an ID and Attrs ID is the unique identifier for the user. Name is the name of the user. Attrs is a map of attributes associated with the user.

Role

type Role struct { ID string Name string Description string Permissions []string }

Role represents a role that can be assigned to a user. ID is the unique identifier for the role. Name is the name of the role. Description is a description of the role. Permissions is a list of permissions associated with the role.

Assignment

type Assignment struct { ID string AccountID string RoleID string Attrs map[string]interface{} }

Assignment represents the assignment of a role to a user. ID is the unique identifier for the assignment. AccountID is the ID of the user. RoleID is the ID of the role.

SystemSpec

type SystemSpec struct { ID string Name string Type string Credentials map[string]interface{} }

SystemSpec represents the configuration for a system. ID is the unique identifier for the system. Name is the name of the system. Type is the type of the system. Credentials is a map of credentials for the system.

Query

type Query struct { SystemSpec SystemSpec Kind QueryKind BaseQuery string Filter string Params map[string]interface{} Limit int Offset int }

Query represents a query to be executed on a system. SystemSpec is the system to query. Kind is the kind of query. Filter string Params is a map of parameters for the query. Limit is the maximum number of results to return. Offset is the number of results to skip.

QueryResult

type QueryResult struct { SystemID string Accounts []Account Roles []Role Assignments []Assignment }

QueryResult represents the result of a query. SystemID is the ID of the system. Accounts is a list of accounts. Roles is a list of roles. Assignments is a list of assignments.

WorkerPool

type WorkerPool struct { wg sync.WaitGroup tasks chan Task shutdown chan struct{} }

WorkerPool contains synchronization information for worker groups.

Last modified: 28 January 2025