Documentation ¶
Index ¶
- type ApiKey
- type AssignAccountToOUParams
- type AuditLog
- type AuditResourceType
- type CallerType
- type CloudAccount
- type CloudTenant
- type CreateAuditLogParams
- type CreateMembershipForUserAndGroupParams
- type CreateOrUpdateCloudAccountParams
- type CreateOrUpdateCloudTenantParams
- type CreateOrganizationalUnitParams
- type CreateTagParams
- type CreateUserParams
- type DBTX
- type DefaultRepo
- type DefaultSearcher
- type DropMembershipForUserAndGroupParams
- type FindCloudAccountByCloudAndTenantParams
- type GetAuditLogsForTargetParams
- type GetCloudTenantParams
- type GetGroupMembershipForUserParams
- type GetGroupMembershipForUserRow
- type GetGroupMembershipRow
- type GetGroupsParams
- type GetUsersParams
- type Group
- type GroupApiKey
- type GroupUser
- type InsertAPIKeyParams
- type NullAuditResourceType
- type NullCallerType
- type OrganizationalUnit
- type OrganizationalUnitsCloudAccount
- type OrganizationalUnitsGroup
- type PatchGroupDisplayNameParams
- type PatchUserParams
- type PgxIface
- type Querier
- type Queries
- func (q *Queries) AssignAccountToOU(ctx context.Context, arg AssignAccountToOUParams) error
- func (q *Queries) CreateAuditLog(ctx context.Context, arg CreateAuditLogParams) (AuditLog, error)
- func (q *Queries) CreateGroup(ctx context.Context, displayName string) (Group, error)
- func (q *Queries) CreateMembershipForUserAndGroup(ctx context.Context, arg CreateMembershipForUserAndGroupParams) error
- func (q *Queries) CreateOrUpdateCloudAccount(ctx context.Context, arg CreateOrUpdateCloudAccountParams) (CloudAccount, error)
- func (q *Queries) CreateOrUpdateCloudTenant(ctx context.Context, arg CreateOrUpdateCloudTenantParams) (CloudTenant, error)
- func (q *Queries) CreateOrganizationalUnit(ctx context.Context, arg CreateOrganizationalUnitParams) (OrganizationalUnit, error)
- func (q *Queries) CreateTag(ctx context.Context, arg CreateTagParams) (StandardTag, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) DeleteAPIKey(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DeleteGroup(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DeleteOrganizationalUnit(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DeleteScimAPIKey(ctx context.Context) error
- func (q *Queries) DeleteTag(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DeleteUser(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DropMembershipForGroup(ctx context.Context, groupID uuid.UUID) error
- func (q *Queries) DropMembershipForUserAndGroup(ctx context.Context, arg DropMembershipForUserAndGroupParams) error
- func (q *Queries) FindAPIKey(ctx context.Context, id uuid.UUID) (ApiKey, error)
- func (q *Queries) FindAPIKeysByID(ctx context.Context, id []uuid.UUID) ([]ApiKey, error)
- func (q *Queries) FindCloudAccount(ctx context.Context, id uuid.UUID) (CloudAccount, error)
- func (q *Queries) FindCloudAccountByCloudAndTenant(ctx context.Context, arg FindCloudAccountByCloudAndTenantParams) (CloudAccount, error)
- func (q *Queries) FindOrganizationalUnit(ctx context.Context, id uuid.UUID) (OrganizationalUnit, error)
- func (q *Queries) FindScimAPIKey(ctx context.Context) (ApiKey, error)
- func (q *Queries) FindTag(ctx context.Context, id uuid.UUID) (StandardTag, error)
- func (q *Queries) FindUserByUsername(ctx context.Context, username string) (User, error)
- func (q *Queries) GetAPIKeys(ctx context.Context) ([]ApiKey, error)
- func (q *Queries) GetAPIKeysOrganizationalUnits(ctx context.Context, apiKeyID uuid.UUID) ([]OrganizationalUnit, error)
- func (q *Queries) GetAuditLogs(ctx context.Context) ([]AuditLog, error)
- func (q *Queries) GetAuditLogsForTarget(ctx context.Context, arg GetAuditLogsForTargetParams) ([]AuditLog, error)
- func (q *Queries) GetCloudTenant(ctx context.Context, arg GetCloudTenantParams) (CloudTenant, error)
- func (q *Queries) GetCloudTenants(ctx context.Context) ([]CloudTenant, error)
- func (q *Queries) GetGroup(ctx context.Context, id uuid.UUID) (Group, error)
- func (q *Queries) GetGroupCount(ctx context.Context) (int64, error)
- func (q *Queries) GetGroupMembership(ctx context.Context, groupID uuid.UUID) ([]GetGroupMembershipRow, error)
- func (q *Queries) GetGroupMembershipForUser(ctx context.Context, arg GetGroupMembershipForUserParams) (GetGroupMembershipForUserRow, error)
- func (q *Queries) GetGroups(ctx context.Context, arg GetGroupsParams) ([]Group, error)
- func (q *Queries) GetOrganizationalUnitChildren(ctx context.Context, parentID uuid.UUID) ([]OrganizationalUnit, error)
- func (q *Queries) GetOrganizationalUnitCloudAccounts(ctx context.Context, organizationalUnitID uuid.UUID) ([]CloudAccount, error)
- func (q *Queries) GetOrganizationalUnits(ctx context.Context) ([]OrganizationalUnit, error)
- func (q *Queries) GetTags(ctx context.Context) ([]StandardTag, error)
- func (q *Queries) GetUser(ctx context.Context, id uuid.UUID) (User, error)
- func (q *Queries) GetUserCount(ctx context.Context) (int64, error)
- func (q *Queries) GetUserOrganizationalUnits(ctx context.Context, userID uuid.UUID) ([]OrganizationalUnit, error)
- func (q *Queries) GetUsers(ctx context.Context, arg GetUsersParams) ([]User, error)
- func (q *Queries) GetUsersByID(ctx context.Context, userIds []uuid.UUID) ([]User, error)
- func (q *Queries) InsertAPIKey(ctx context.Context, arg InsertAPIKeyParams) (ApiKey, error)
- func (q *Queries) InsertScimAPIKey(ctx context.Context, apiKeyID uuid.UUID) (ScimApiKey, error)
- func (q *Queries) OrganizationalUnitsCloudAccounts(ctx context.Context, id []uuid.UUID) ([]CloudAccount, error)
- func (q *Queries) PatchGroupDisplayName(ctx context.Context, arg PatchGroupDisplayNameParams) error
- func (q *Queries) PatchUser(ctx context.Context, arg PatchUserParams) error
- func (q *Queries) SearchTag(ctx context.Context, arg SearchTagParams) ([]CloudAccount, error)
- func (q *Queries) UnAssignAccountFromOUs(ctx context.Context, cloudAccountID uuid.UUID) error
- func (q *Queries) UpdateCloudAccount(ctx context.Context, arg UpdateCloudAccountParams) error
- func (q *Queries) UpdateCloudAccountTagsDriftDetected(ctx context.Context, arg UpdateCloudAccountTagsDriftDetectedParams) error
- func (q *Queries) UpdateTag(ctx context.Context, arg UpdateTagParams) (StandardTag, error)
- func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type Repository
- type ScimApiKey
- type SearchCloudAccountsInput
- type SearchTagParams
- type Searcher
- type StandardTag
- type UpdateCloudAccountParams
- type UpdateCloudAccountTagsDriftDetectedParams
- type UpdateTagParams
- type UpdateUserParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignAccountToOUParams ¶
type AuditResourceType ¶
type AuditResourceType string
const ( AuditResourceTypeCloudAccount AuditResourceType = "cloud_account" AuditResourceTypeTag AuditResourceType = "tag" AuditResourceTypePolicy AuditResourceType = "policy" AuditResourceTypeCloudTenant AuditResourceType = "cloud_tenant" AuditResourceTypeUser AuditResourceType = "user" AuditResourceTypeGroup AuditResourceType = "group" AuditResourceTypeApiKey AuditResourceType = "api_key" AuditResourceTypeOrganizationalUnit AuditResourceType = "organizational_unit" )
func (*AuditResourceType) Scan ¶
func (e *AuditResourceType) Scan(src interface{}) error
type CallerType ¶
type CallerType string
const ( CallerTypeUser CallerType = "user" CallerTypeApiKey CallerType = "api_key" )
func (*CallerType) Scan ¶
func (e *CallerType) Scan(src interface{}) error
type CloudAccount ¶
type CloudTenant ¶
type CreateAuditLogParams ¶
type CreateAuditLogParams struct { ResourceType AuditResourceType ResourceID uuid.UUID CallerID uuid.UUID CallerType CallerType Message string }
type CreateTagParams ¶
type CreateUserParams ¶
type CreateUserParams struct { Username string Name pgtype.JSONB DisplayName sql.NullString Emails pgtype.JSONB Active bool Locale sql.NullString ExternalID sql.NullString }
type DefaultRepo ¶
type DefaultRepo struct {
*Queries
}
func NewRepo ¶
func NewRepo(db DBTX) *DefaultRepo
func (*DefaultRepo) WithTx ¶
func (q *DefaultRepo) WithTx(tx pgx.Tx) Repository
type DefaultSearcher ¶
type DefaultSearcher struct {
// contains filtered or unexported fields
}
func NewSearcher ¶
func NewSearcher(pool *pgxpool.Pool) *DefaultSearcher
func (*DefaultSearcher) SearchCloudAccounts ¶
func (s *DefaultSearcher) SearchCloudAccounts(ctx context.Context, input SearchCloudAccountsInput) ([]CloudAccount, error)
type GetAuditLogsForTargetParams ¶
type GetAuditLogsForTargetParams struct { ResourceID uuid.UUID ResourceType AuditResourceType }
type GetCloudTenantParams ¶
type GetGroupMembershipRow ¶
type GetGroupsParams ¶
type GetUsersParams ¶
type InsertAPIKeyParams ¶
type InsertAPIKeyParams struct { Encodedhash string System bool Owner string Description sql.NullString }
type NullAuditResourceType ¶
type NullAuditResourceType struct { AuditResourceType AuditResourceType Valid bool // Valid is true if AuditResourceType is not NULL }
func (*NullAuditResourceType) Scan ¶
func (ns *NullAuditResourceType) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullCallerType ¶
type NullCallerType struct { CallerType CallerType Valid bool // Valid is true if CallerType is not NULL }
func (*NullCallerType) Scan ¶
func (ns *NullCallerType) Scan(value interface{}) error
Scan implements the Scanner interface.
type OrganizationalUnit ¶
type PatchUserParams ¶
type Querier ¶
type Querier interface { AssignAccountToOU(ctx context.Context, arg AssignAccountToOUParams) error CreateAuditLog(ctx context.Context, arg CreateAuditLogParams) (AuditLog, error) CreateGroup(ctx context.Context, displayName string) (Group, error) CreateMembershipForUserAndGroup(ctx context.Context, arg CreateMembershipForUserAndGroupParams) error CreateOrUpdateCloudAccount(ctx context.Context, arg CreateOrUpdateCloudAccountParams) (CloudAccount, error) //------------------------------------------------------------------------------------------------------------------ // Cloud Tenants //------------------------------------------------------------------------------------------------------------------ CreateOrUpdateCloudTenant(ctx context.Context, arg CreateOrUpdateCloudTenantParams) (CloudTenant, error) CreateOrganizationalUnit(ctx context.Context, arg CreateOrganizationalUnitParams) (OrganizationalUnit, error) CreateTag(ctx context.Context, arg CreateTagParams) (StandardTag, error) CreateUser(ctx context.Context, arg CreateUserParams) (User, error) DeleteAPIKey(ctx context.Context, id uuid.UUID) error DeleteGroup(ctx context.Context, id uuid.UUID) error DeleteOrganizationalUnit(ctx context.Context, id uuid.UUID) error DeleteScimAPIKey(ctx context.Context) error DeleteTag(ctx context.Context, id uuid.UUID) error DeleteUser(ctx context.Context, id uuid.UUID) error DropMembershipForGroup(ctx context.Context, groupID uuid.UUID) error DropMembershipForUserAndGroup(ctx context.Context, arg DropMembershipForUserAndGroupParams) error FindAPIKey(ctx context.Context, id uuid.UUID) (ApiKey, error) FindAPIKeysByID(ctx context.Context, id []uuid.UUID) ([]ApiKey, error) FindCloudAccount(ctx context.Context, id uuid.UUID) (CloudAccount, error) FindCloudAccountByCloudAndTenant(ctx context.Context, arg FindCloudAccountByCloudAndTenantParams) (CloudAccount, error) FindOrganizationalUnit(ctx context.Context, id uuid.UUID) (OrganizationalUnit, error) FindScimAPIKey(ctx context.Context) (ApiKey, error) FindTag(ctx context.Context, id uuid.UUID) (StandardTag, error) FindUserByUsername(ctx context.Context, username string) (User, error) GetAPIKeys(ctx context.Context) ([]ApiKey, error) GetAPIKeysOrganizationalUnits(ctx context.Context, apiKeyID uuid.UUID) ([]OrganizationalUnit, error) //------------------------------------------------------------------------------------------------------------------ // Audit Logs //------------------------------------------------------------------------------------------------------------------ GetAuditLogs(ctx context.Context) ([]AuditLog, error) GetAuditLogsForTarget(ctx context.Context, arg GetAuditLogsForTargetParams) ([]AuditLog, error) GetCloudTenant(ctx context.Context, arg GetCloudTenantParams) (CloudTenant, error) GetCloudTenants(ctx context.Context) ([]CloudTenant, error) GetGroup(ctx context.Context, id uuid.UUID) (Group, error) GetGroupCount(ctx context.Context) (int64, error) //------------------------------------------------------------------------------------------------------------------ // Membership //------------------------------------------------------------------------------------------------------------------ GetGroupMembership(ctx context.Context, groupID uuid.UUID) ([]GetGroupMembershipRow, error) GetGroupMembershipForUser(ctx context.Context, arg GetGroupMembershipForUserParams) (GetGroupMembershipForUserRow, error) //------------------------------------------------------------------------------------------------------------------ // Groups //------------------------------------------------------------------------------------------------------------------ GetGroups(ctx context.Context, arg GetGroupsParams) ([]Group, error) //------------------------------------------------------------------------------------------------------------------ // Organizational Units //------------------------------------------------------------------------------------------------------------------ GetOrganizationalUnitChildren(ctx context.Context, parentID uuid.UUID) ([]OrganizationalUnit, error) GetOrganizationalUnitCloudAccounts(ctx context.Context, organizationalUnitID uuid.UUID) ([]CloudAccount, error) GetOrganizationalUnits(ctx context.Context) ([]OrganizationalUnit, error) //------------------------------------------------------------------------------------------------------------------ // Tags //------------------------------------------------------------------------------------------------------------------ GetTags(ctx context.Context) ([]StandardTag, error) GetUser(ctx context.Context, id uuid.UUID) (User, error) GetUserCount(ctx context.Context) (int64, error) GetUserOrganizationalUnits(ctx context.Context, userID uuid.UUID) ([]OrganizationalUnit, error) //------------------------------------------------------------------------------------------------------------------ // Users //------------------------------------------------------------------------------------------------------------------ GetUsers(ctx context.Context, arg GetUsersParams) ([]User, error) GetUsersByID(ctx context.Context, userIds []uuid.UUID) ([]User, error) //------------------------------------------------------------------------------------------------------------------ // SCIM API Key //------------------------------------------------------------------------------------------------------------------ InsertAPIKey(ctx context.Context, arg InsertAPIKeyParams) (ApiKey, error) InsertScimAPIKey(ctx context.Context, apiKeyID uuid.UUID) (ScimApiKey, error) OrganizationalUnitsCloudAccounts(ctx context.Context, id []uuid.UUID) ([]CloudAccount, error) PatchGroupDisplayName(ctx context.Context, arg PatchGroupDisplayNameParams) error PatchUser(ctx context.Context, arg PatchUserParams) error //------------------------------------------------------------------------------------------------------------------ // Cloud Accounts //------------------------------------------------------------------------------------------------------------------ SearchTag(ctx context.Context, arg SearchTagParams) ([]CloudAccount, error) UnAssignAccountFromOUs(ctx context.Context, cloudAccountID uuid.UUID) error UpdateCloudAccount(ctx context.Context, arg UpdateCloudAccountParams) error UpdateCloudAccountTagsDriftDetected(ctx context.Context, arg UpdateCloudAccountTagsDriftDetectedParams) error UpdateTag(ctx context.Context, arg UpdateTagParams) (StandardTag, error) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error) }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AssignAccountToOU ¶
func (q *Queries) AssignAccountToOU(ctx context.Context, arg AssignAccountToOUParams) error
func (*Queries) CreateAuditLog ¶
func (*Queries) CreateGroup ¶
func (*Queries) CreateMembershipForUserAndGroup ¶
func (q *Queries) CreateMembershipForUserAndGroup(ctx context.Context, arg CreateMembershipForUserAndGroupParams) error
func (*Queries) CreateOrUpdateCloudAccount ¶
func (q *Queries) CreateOrUpdateCloudAccount(ctx context.Context, arg CreateOrUpdateCloudAccountParams) (CloudAccount, error)
func (*Queries) CreateOrUpdateCloudTenant ¶
func (q *Queries) CreateOrUpdateCloudTenant(ctx context.Context, arg CreateOrUpdateCloudTenantParams) (CloudTenant, error)
------------------------------------------------------------------------------------------------------------------ Cloud Tenants ------------------------------------------------------------------------------------------------------------------
func (*Queries) CreateOrganizationalUnit ¶
func (q *Queries) CreateOrganizationalUnit(ctx context.Context, arg CreateOrganizationalUnitParams) (OrganizationalUnit, error)
func (*Queries) CreateTag ¶
func (q *Queries) CreateTag(ctx context.Context, arg CreateTagParams) (StandardTag, error)
func (*Queries) CreateUser ¶
func (*Queries) DeleteAPIKey ¶
func (*Queries) DeleteGroup ¶
func (*Queries) DeleteOrganizationalUnit ¶
func (*Queries) DropMembershipForGroup ¶
func (*Queries) DropMembershipForUserAndGroup ¶
func (q *Queries) DropMembershipForUserAndGroup(ctx context.Context, arg DropMembershipForUserAndGroupParams) error
func (*Queries) FindAPIKey ¶
func (*Queries) FindAPIKeysByID ¶
func (*Queries) FindCloudAccount ¶
func (*Queries) FindCloudAccountByCloudAndTenant ¶
func (q *Queries) FindCloudAccountByCloudAndTenant(ctx context.Context, arg FindCloudAccountByCloudAndTenantParams) (CloudAccount, error)
func (*Queries) FindOrganizationalUnit ¶
func (*Queries) FindScimAPIKey ¶
func (*Queries) FindUserByUsername ¶
func (*Queries) GetAPIKeysOrganizationalUnits ¶
func (*Queries) GetAuditLogs ¶
------------------------------------------------------------------------------------------------------------------ Audit Logs ------------------------------------------------------------------------------------------------------------------
func (*Queries) GetAuditLogsForTarget ¶
func (*Queries) GetCloudTenant ¶
func (q *Queries) GetCloudTenant(ctx context.Context, arg GetCloudTenantParams) (CloudTenant, error)
func (*Queries) GetCloudTenants ¶
func (q *Queries) GetCloudTenants(ctx context.Context) ([]CloudTenant, error)
func (*Queries) GetGroupMembership ¶
func (q *Queries) GetGroupMembership(ctx context.Context, groupID uuid.UUID) ([]GetGroupMembershipRow, error)
------------------------------------------------------------------------------------------------------------------ Membership ------------------------------------------------------------------------------------------------------------------
func (*Queries) GetGroupMembershipForUser ¶
func (q *Queries) GetGroupMembershipForUser(ctx context.Context, arg GetGroupMembershipForUserParams) (GetGroupMembershipForUserRow, error)
func (*Queries) GetGroups ¶
------------------------------------------------------------------------------------------------------------------ Groups ------------------------------------------------------------------------------------------------------------------
func (*Queries) GetOrganizationalUnitChildren ¶
func (q *Queries) GetOrganizationalUnitChildren(ctx context.Context, parentID uuid.UUID) ([]OrganizationalUnit, error)
------------------------------------------------------------------------------------------------------------------ Organizational Units ------------------------------------------------------------------------------------------------------------------
func (*Queries) GetOrganizationalUnitCloudAccounts ¶
func (*Queries) GetOrganizationalUnits ¶
func (q *Queries) GetOrganizationalUnits(ctx context.Context) ([]OrganizationalUnit, error)
func (*Queries) GetTags ¶
func (q *Queries) GetTags(ctx context.Context) ([]StandardTag, error)
------------------------------------------------------------------------------------------------------------------ Tags ------------------------------------------------------------------------------------------------------------------
func (*Queries) GetUserOrganizationalUnits ¶
func (*Queries) GetUsers ¶
------------------------------------------------------------------------------------------------------------------ Users ------------------------------------------------------------------------------------------------------------------
func (*Queries) GetUsersByID ¶
func (*Queries) InsertAPIKey ¶
------------------------------------------------------------------------------------------------------------------ SCIM API Key ------------------------------------------------------------------------------------------------------------------
func (*Queries) InsertScimAPIKey ¶
func (*Queries) OrganizationalUnitsCloudAccounts ¶
func (*Queries) PatchGroupDisplayName ¶
func (q *Queries) PatchGroupDisplayName(ctx context.Context, arg PatchGroupDisplayNameParams) error
func (*Queries) PatchUser ¶
func (q *Queries) PatchUser(ctx context.Context, arg PatchUserParams) error
func (*Queries) SearchTag ¶
func (q *Queries) SearchTag(ctx context.Context, arg SearchTagParams) ([]CloudAccount, error)
------------------------------------------------------------------------------------------------------------------ Cloud Accounts ------------------------------------------------------------------------------------------------------------------
func (*Queries) UnAssignAccountFromOUs ¶
func (*Queries) UpdateCloudAccount ¶
func (q *Queries) UpdateCloudAccount(ctx context.Context, arg UpdateCloudAccountParams) error
func (*Queries) UpdateCloudAccountTagsDriftDetected ¶
func (q *Queries) UpdateCloudAccountTagsDriftDetected(ctx context.Context, arg UpdateCloudAccountTagsDriftDetectedParams) error
func (*Queries) UpdateTag ¶
func (q *Queries) UpdateTag(ctx context.Context, arg UpdateTagParams) (StandardTag, error)
func (*Queries) UpdateUser ¶
type Repository ¶
type Repository interface { Querier WithTx(tx pgx.Tx) Repository }
type ScimApiKey ¶
type SearchCloudAccountsInput ¶
type SearchCloudAccountsInput struct {
Filters map[string]interface{}
}
type SearchTagParams ¶
type Searcher ¶
type Searcher interface {
SearchCloudAccounts(ctx context.Context, input SearchCloudAccountsInput) ([]CloudAccount, error)
}
type StandardTag ¶
type UpdateTagParams ¶
type UpdateUserParams ¶
type UpdateUserParams struct { ID uuid.UUID Username string Name pgtype.JSONB DisplayName sql.NullString Emails pgtype.JSONB Active bool ExternalID sql.NullString Locale sql.NullString }