core

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account added in v1.3.0

type Account struct {
	AuthTypes []struct {
		Active       bool   `json:"active"`
		AuthTypeCode string `json:"auth_type_code"`
		AuthTypeID   string `json:"auth_type_id"`
		Identifier   string `json:"identifier"`
		Params       struct {
			User struct {
				Email          string        `json:"email"`
				FirstName      string        `json:"first_name"`
				Groups         []interface{} `json:"groups"`
				Identifier     string        `json:"identifier"`
				LastName       string        `json:"last_name"`
				MiddleName     string        `json:"middle_name"`
				Roles          []string      `json:"roles"`
				SystemSpecific struct {
					PreferredUsername string `json:"preferred_username"`
				} `json:"system_specific"`
			} `json:"user"`
		} `json:"params"`
	} `json:"auth_types"`
	Profile struct {
		Address   string `json:"address"`
		BirthYear int    `json:"birth_year"`
		Country   string `json:"country"`
		Email     string `json:"email"`
		FirstName string `json:"first_name"`
		ID        string `json:"id"`
		LastName  string `json:"last_name"`
		Phone     string `json:"phone"`
		PhotoURL  string `json:"photo_url"`
		State     string `json:"state"`
		ZipCode   string `json:"zip_code"`
	} `json:"profile"`
	ID          string            `json:"id"`
	OrgID       string            `json:"org_id"`
	ExternalIDs map[string]string `json:"external_ids"`
}

Account wraps the account structure from the Core BB @name Account

type DeletedAccountsConfig

type DeletedAccountsConfig struct {
	Callback func([]string) error // Function to call once the deleted accounts are received
	Period   uint                 // How often to request deleted account list in hours (the default is 2)
	// contains filtered or unexported fields
}

DeletedAccountsConfig represents a configuration for getting deleted accounts from a remote core service

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service contains configurations and helper functions required to utilize certain core services

func NewService

func NewService(serviceAccountManager *auth.ServiceAccountManager, deletedAccountsConfig *DeletedAccountsConfig, logger *logs.Logger) (*Service, error)

NewService creates and configures a new Service instance

func (*Service) GetUserAccounts added in v1.3.0

func (c *Service) GetUserAccounts(searchParams map[string]interface{}, appID *string, orgID *string, limit *int, offset *int) ([]Account, error)

GetUserAccounts Gets user accounts

func (*Service) StartDeletedAccountsTimer

func (c *Service) StartDeletedAccountsTimer()

StartDeletedAccountsTimer starts a timer that periodically retrieves deleted account IDs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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