Documentation
¶
Index ¶
Constants ¶
View Source
const TriggerIdentityDomainsSynced = "triggers/sync/openstack/identity/types/domains"
Trigger executed when new domains are available.
View Source
const TriggerIdentityProjectsSynced = "triggers/sync/openstack/identity/types/projects"
Trigger executed when new projects are available.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Domain ¶
type IdentityAPI ¶
type IdentityAPI interface {
Init(ctx context.Context)
// Retrieves all domains from the OpenStack identity service.
GetAllDomains(ctx context.Context) ([]Domain, error)
// Retrieves all projects from the OpenStack identity service.
GetAllProjects(ctx context.Context) ([]Project, error)
}
func NewIdentityAPI ¶
func NewIdentityAPI(mon sync.Monitor, k keystone.KeystoneAPI, conf IdentityConf) IdentityAPI
type IdentityConf ¶
type IdentityConf = conf.SyncOpenStackIdentityConfig
type IdentitySyncer ¶
type IdentitySyncer struct {
DB db.DB
Mon sync.Monitor
API IdentityAPI
MqttClient mqtt.Client
Conf IdentityConf
}
func (*IdentitySyncer) Init ¶
func (s *IdentitySyncer) Init(ctx context.Context)
func (*IdentitySyncer) SyncDomains ¶
func (s *IdentitySyncer) SyncDomains(ctx context.Context) ([]Domain, error)
func (*IdentitySyncer) SyncProjects ¶
func (s *IdentitySyncer) SyncProjects(ctx context.Context) ([]Project, error)
type Project ¶
type Project struct {
ID string `json:"id" db:"id,primarykey"`
Name string `json:"name" db:"name"`
DomainID string `json:"domain_id" db:"domain_id"`
ParentID string `json:"parent_id" db:"parent_id"`
IsDomain bool `json:"is_domain" db:"is_domain"`
Enabled bool `json:"enabled" db:"enabled"`
Tags string `json:"tags" db:"tags"` // Comma-separated tags
}
Project as inserted into the database for efficient handling.
type RawProject ¶
type RawProject struct {
ID string `json:"id"`
Name string `json:"name"`
DomainID string `json:"domain_id"`
ParentID string `json:"parent_id"`
IsDomain bool `json:"is_domain"`
Enabled bool `json:"enabled"`
Tags []string `json:"tags"`
}
RawProject represents the raw project data as returned by the OpenStack identity API.
Click to show internal directories.
Click to hide internal directories.