Documentation ¶
Index ¶
- Constants
- Variables
- func AccessControl(s store.Storer) *accessControl
- func AccessControlActionGrant(props ...*accessControlActionProps) *accessControlAction
- func AccessControlErrGeneric(mm ...*accessControlActionProps) *errors.Error
- func AccessControlErrNotAllowedToSetPermissions(mm ...*accessControlActionProps) *errors.Error
- func AddFederationLabel(entity label.LabeledResource, key string, value string)
- func ExposedModule() *exposedModule
- func ExposedModuleActionCreate(props ...*exposedModuleActionProps) *exposedModuleAction
- func ExposedModuleActionDelete(props ...*exposedModuleActionProps) *exposedModuleAction
- func ExposedModuleActionLookup(props ...*exposedModuleActionProps) *exposedModuleAction
- func ExposedModuleActionSearch(props ...*exposedModuleActionProps) *exposedModuleAction
- func ExposedModuleActionUndelete(props ...*exposedModuleActionProps) *exposedModuleAction
- func ExposedModuleActionUpdate(props ...*exposedModuleActionProps) *exposedModuleAction
- func ExposedModuleErrComposeModuleNotFound(mm ...*exposedModuleActionProps) *errors.Error
- func ExposedModuleErrComposeNamespaceNotFound(mm ...*exposedModuleActionProps) *errors.Error
- func ExposedModuleErrGeneric(mm ...*exposedModuleActionProps) *errors.Error
- func ExposedModuleErrInvalidID(mm ...*exposedModuleActionProps) *errors.Error
- func ExposedModuleErrNodeNotFound(mm ...*exposedModuleActionProps) *errors.Error
- func ExposedModuleErrNotAllowedToCreate(mm ...*exposedModuleActionProps) *errors.Error
- func ExposedModuleErrNotAllowedToManage(mm ...*exposedModuleActionProps) *errors.Error
- func ExposedModuleErrNotFound(mm ...*exposedModuleActionProps) *errors.Error
- func ExposedModuleErrNotUnique(mm ...*exposedModuleActionProps) *errors.Error
- func ExposedModuleErrRequestParametersInvalid(mm ...*exposedModuleActionProps) *errors.Error
- func ExposedModuleErrStaleData(mm ...*exposedModuleActionProps) *errors.Error
- func HttpHandshake(client httpNodeHandshaker) *httpNodeHandshake
- func Initialize(_ context.Context, log *zap.Logger, s store.Storer, c Config) (err error)
- func ModuleMapping() *moduleMapping
- func ModuleMappingActionCreate(props ...*moduleMappingActionProps) *moduleMappingAction
- func ModuleMappingActionDelete(props ...*moduleMappingActionProps) *moduleMappingAction
- func ModuleMappingActionLookup(props ...*moduleMappingActionProps) *moduleMappingAction
- func ModuleMappingActionSearch(props ...*moduleMappingActionProps) *moduleMappingAction
- func ModuleMappingActionUpdate(props ...*moduleMappingActionProps) *moduleMappingAction
- func ModuleMappingErrComposeModuleNotFound(mm ...*moduleMappingActionProps) *errors.Error
- func ModuleMappingErrComposeNamespaceNotFound(mm ...*moduleMappingActionProps) *errors.Error
- func ModuleMappingErrFederationModuleNotFound(mm ...*moduleMappingActionProps) *errors.Error
- func ModuleMappingErrGeneric(mm ...*moduleMappingActionProps) *errors.Error
- func ModuleMappingErrModuleMappingExists(mm ...*moduleMappingActionProps) *errors.Error
- func ModuleMappingErrNodeNotFound(mm ...*moduleMappingActionProps) *errors.Error
- func ModuleMappingErrNotAllowedToMap(mm ...*moduleMappingActionProps) *errors.Error
- func ModuleMappingErrNotFound(mm ...*moduleMappingActionProps) *errors.Error
- func Node(s store.Storer, u service.UserService, al actionlog.Recorder, th tokenIssuer, ...) *node
- func NodeActionCreate(props ...*nodeActionProps) *nodeAction
- func NodeActionCreateFromPairingURI(props ...*nodeActionProps) *nodeAction
- func NodeActionDelete(props ...*nodeActionProps) *nodeAction
- func NodeActionHandshakeComplete(props ...*nodeActionProps) *nodeAction
- func NodeActionHandshakeConfirm(props ...*nodeActionProps) *nodeAction
- func NodeActionHandshakeInit(props ...*nodeActionProps) *nodeAction
- func NodeActionLookup(props ...*nodeActionProps) *nodeAction
- func NodeActionOttRegenerated(props ...*nodeActionProps) *nodeAction
- func NodeActionPair(props ...*nodeActionProps) *nodeAction
- func NodeActionRecreateFromPairingURI(props ...*nodeActionProps) *nodeAction
- func NodeActionSearch(props ...*nodeActionProps) *nodeAction
- func NodeActionUndelete(props ...*nodeActionProps) *nodeAction
- func NodeActionUpdate(props ...*nodeActionProps) *nodeAction
- func NodeErrGeneric(mm ...*nodeActionProps) *errors.Error
- func NodeErrInvalidID(mm ...*nodeActionProps) *errors.Error
- func NodeErrNotAllowedToCreate(mm ...*nodeActionProps) *errors.Error
- func NodeErrNotAllowedToManage(mm ...*nodeActionProps) *errors.Error
- func NodeErrNotAllowedToPair(mm ...*nodeActionProps) *errors.Error
- func NodeErrNotAllowedToSearch(mm ...*nodeActionProps) *errors.Error
- func NodeErrNotFound(mm ...*nodeActionProps) *errors.Error
- func NodeErrPairingTokenInvalid(mm ...*nodeActionProps) *errors.Error
- func NodeErrPairingURIInvalid(mm ...*nodeActionProps) *errors.Error
- func NodeErrPairingURISourceIDInvalid(mm ...*nodeActionProps) *errors.Error
- func NodeErrPairingURITokenInvalid(mm ...*nodeActionProps) *errors.Error
- func NodeSyncActionCreate(props ...*nodeSyncActionProps) *nodeSyncAction
- func NodeSyncActionLookup(props ...*nodeSyncActionProps) *nodeSyncAction
- func NodeSyncErrGeneric(mm ...*nodeSyncActionProps) *errors.Error
- func NodeSyncErrNodeNotFound(mm ...*nodeSyncActionProps) *errors.Error
- func NodeSyncErrNotFound(mm ...*nodeSyncActionProps) *errors.Error
- func SharedModule() *sharedModule
- func SharedModuleActionCreate(props ...*sharedModuleActionProps) *sharedModuleAction
- func SharedModuleActionDelete(props ...*sharedModuleActionProps) *sharedModuleAction
- func SharedModuleActionLookup(props ...*sharedModuleActionProps) *sharedModuleAction
- func SharedModuleActionSearch(props ...*sharedModuleActionProps) *sharedModuleAction
- func SharedModuleActionUndelete(props ...*sharedModuleActionProps) *sharedModuleAction
- func SharedModuleActionUpdate(props ...*sharedModuleActionProps) *sharedModuleAction
- func SharedModuleErrFederationSyncStructureChanged(mm ...*sharedModuleActionProps) *errors.Error
- func SharedModuleErrGeneric(mm ...*sharedModuleActionProps) *errors.Error
- func SharedModuleErrInvalidID(mm ...*sharedModuleActionProps) *errors.Error
- func SharedModuleErrNodeNotFound(mm ...*sharedModuleActionProps) *errors.Error
- func SharedModuleErrNotAllowedToCreate(mm ...*sharedModuleActionProps) *errors.Error
- func SharedModuleErrNotAllowedToManage(mm ...*sharedModuleActionProps) *errors.Error
- func SharedModuleErrNotAllowedToMap(mm ...*sharedModuleActionProps) *errors.Error
- func SharedModuleErrNotFound(mm ...*sharedModuleActionProps) *errors.Error
- func SharedModuleErrNotUnique(mm ...*sharedModuleActionProps) *errors.Error
- func SharedModuleErrStaleData(mm ...*sharedModuleActionProps) *errors.Error
- func Watchers(ctx context.Context)
- func WorkerData(sync *Sync, logger *zap.Logger) *syncWorkerData
- func WorkerStructure(sync *Sync, logger *zap.Logger) *syncWorkerStructure
- type AuxResponseSet
- type Config
- type ExposedModuleService
- type Mapper
- type ModuleMappingService
- type NodeSyncService
- type Payload
- type Processer
- type ProcesserResponse
- type SharedModuleService
- type Sync
- func (s *Sync) CanUpdateSharedModule(ctx context.Context, new *types.SharedModule, existing *types.SharedModule) (bool, error)
- func (s *Sync) CreateRecord(ctx context.Context, rec *ct.Record) (out *ct.Record, err error)
- func (s *Sync) CreateSharedModule(ctx context.Context, new *types.SharedModule) (*types.SharedModule, error)
- func (s *Sync) DeleteRecord(ctx context.Context, rec *ct.Record) error
- func (s *Sync) FetchUrl(ctx context.Context, url string) (io.Reader, error)
- func (s *Sync) FindRecords(ctx context.Context, filter ct.RecordFilter) (set ct.RecordSet, err error)
- func (s *Sync) GetLastStructureSyncStatus(ctx context.Context, nodeID, externalFederationModuleID uint64) (syncStatus string, err error)
- func (s *Sync) GetLastSyncTime(ctx context.Context, nodeID uint64, syncType string) (*time.Time, error)
- func (s *Sync) GetModuleMappings(ctx context.Context, moduleID uint64) (out *types.ModuleMapping, err error)
- func (s *Sync) GetPairedNodes(ctx context.Context) (types.NodeSet, error)
- func (s *Sync) GetSharedModules(ctx context.Context, nodeID uint64) (types.SharedModuleSet, error)
- func (s *Sync) LoadUserWithRoles(ctx context.Context, nodeID uint64) (*st.User, error)
- func (s *Sync) LookupSharedModule(ctx context.Context, new *types.SharedModule) (*types.SharedModule, error)
- func (s *Sync) PrepareModuleMappings(ctx context.Context, mappings *types.ModuleMapping) (ct.RecordValueSet, error)
- func (s *Sync) ProcessPayload(ctx context.Context, payload []byte, out chan Url, url types.SyncerURI, ...) (ProcesserResponse, error)
- func (s *Sync) QueueUrl(url Url, out chan Url)
- func (s *Sync) UpdateRecord(ctx context.Context, rec *ct.Record) (out *ct.Record, err error)
- func (s *Sync) UpdateSharedModule(ctx context.Context, updated *types.SharedModule) (*types.SharedModule, error)
- type Syncer
- func (h *Syncer) Fetch(ctx context.Context, url string) (io.Reader, error)
- func (h *Syncer) ParseHeader(ctx context.Context, payload []byte) (aux AuxResponseSet, err error)
- func (h *Syncer) Process(ctx context.Context, payload []byte, out chan Url, url types.SyncerURI, ...) (ProcesserResponse, error)
- func (h *Syncer) Queue(url Url, out chan Url)
- type Url
Constants ¶
const FederationUserToken string = "authToken"
const (
TokenLength = 32
)
Variables ¶
var ( DefaultStore store.Storer DefaultLogger *zap.Logger DefaultAccessControl *accessControl // CurrentSettings represents current system settings CurrentSettings = &types.AppSettings{} DefaultOptions options.FederationOpt DefaultActionlog actionlog.Recorder DefaultNode *node DefaultNodeSync NodeSyncService DefaultExposedModule ExposedModuleService DefaultModuleMapping ModuleMappingService )
Functions ¶
func AccessControl ¶
func AccessControlActionGrant ¶
func AccessControlActionGrant(props ...*accessControlActionProps) *accessControlAction
AccessControlActionGrant returns "federation:access_control.grant" action
This function is auto-generated.
func AccessControlErrGeneric ¶
AccessControlErrGeneric returns "federation:access_control.generic" as *errors.Error
This function is auto-generated.
func AccessControlErrNotAllowedToSetPermissions ¶
AccessControlErrNotAllowedToSetPermissions returns "federation:access_control.notAllowedToSetPermissions" as *errors.Error
This function is auto-generated.
func AddFederationLabel ¶
func AddFederationLabel(entity label.LabeledResource, key string, value string)
func ExposedModule ¶
func ExposedModule() *exposedModule
func ExposedModuleActionCreate ¶
func ExposedModuleActionCreate(props ...*exposedModuleActionProps) *exposedModuleAction
ExposedModuleActionCreate returns "federation:exposed_module.create" action
This function is auto-generated.
func ExposedModuleActionDelete ¶
func ExposedModuleActionDelete(props ...*exposedModuleActionProps) *exposedModuleAction
ExposedModuleActionDelete returns "federation:exposed_module.delete" action
This function is auto-generated.
func ExposedModuleActionLookup ¶
func ExposedModuleActionLookup(props ...*exposedModuleActionProps) *exposedModuleAction
ExposedModuleActionLookup returns "federation:exposed_module.lookup" action
This function is auto-generated.
func ExposedModuleActionSearch ¶
func ExposedModuleActionSearch(props ...*exposedModuleActionProps) *exposedModuleAction
ExposedModuleActionSearch returns "federation:exposed_module.search" action
This function is auto-generated.
func ExposedModuleActionUndelete ¶
func ExposedModuleActionUndelete(props ...*exposedModuleActionProps) *exposedModuleAction
ExposedModuleActionUndelete returns "federation:exposed_module.undelete" action
This function is auto-generated.
func ExposedModuleActionUpdate ¶
func ExposedModuleActionUpdate(props ...*exposedModuleActionProps) *exposedModuleAction
ExposedModuleActionUpdate returns "federation:exposed_module.update" action
This function is auto-generated.
func ExposedModuleErrComposeModuleNotFound ¶
ExposedModuleErrComposeModuleNotFound returns "federation:exposed_module.composeModuleNotFound" as *errors.Error
This function is auto-generated.
func ExposedModuleErrComposeNamespaceNotFound ¶
ExposedModuleErrComposeNamespaceNotFound returns "federation:exposed_module.composeNamespaceNotFound" as *errors.Error
This function is auto-generated.
func ExposedModuleErrGeneric ¶
ExposedModuleErrGeneric returns "federation:exposed_module.generic" as *errors.Error
This function is auto-generated.
func ExposedModuleErrInvalidID ¶
ExposedModuleErrInvalidID returns "federation:exposed_module.invalidID" as *errors.Error
This function is auto-generated.
func ExposedModuleErrNodeNotFound ¶
ExposedModuleErrNodeNotFound returns "federation:exposed_module.nodeNotFound" as *errors.Error
This function is auto-generated.
func ExposedModuleErrNotAllowedToCreate ¶
ExposedModuleErrNotAllowedToCreate returns "federation:exposed_module.notAllowedToCreate" as *errors.Error
This function is auto-generated.
func ExposedModuleErrNotAllowedToManage ¶
ExposedModuleErrNotAllowedToManage returns "federation:exposed_module.notAllowedToManage" as *errors.Error
This function is auto-generated.
func ExposedModuleErrNotFound ¶
ExposedModuleErrNotFound returns "federation:exposed_module.notFound" as *errors.Error
This function is auto-generated.
func ExposedModuleErrNotUnique ¶
ExposedModuleErrNotUnique returns "federation:exposed_module.notUnique" as *errors.Error
This function is auto-generated.
func ExposedModuleErrRequestParametersInvalid ¶
ExposedModuleErrRequestParametersInvalid returns "federation:exposed_module.requestParametersInvalid" as *errors.Error
This function is auto-generated.
func ExposedModuleErrStaleData ¶
ExposedModuleErrStaleData returns "federation:exposed_module.staleData" as *errors.Error
This function is auto-generated.
func HttpHandshake ¶
func HttpHandshake(client httpNodeHandshaker) *httpNodeHandshake
func Initialize ¶
func ModuleMapping ¶
func ModuleMapping() *moduleMapping
func ModuleMappingActionCreate ¶
func ModuleMappingActionCreate(props ...*moduleMappingActionProps) *moduleMappingAction
ModuleMappingActionCreate returns "federation:module_mapping.create" action
This function is auto-generated.
func ModuleMappingActionDelete ¶
func ModuleMappingActionDelete(props ...*moduleMappingActionProps) *moduleMappingAction
ModuleMappingActionDelete returns "federation:module_mapping.delete" action
This function is auto-generated.
func ModuleMappingActionLookup ¶
func ModuleMappingActionLookup(props ...*moduleMappingActionProps) *moduleMappingAction
ModuleMappingActionLookup returns "federation:module_mapping.lookup" action
This function is auto-generated.
func ModuleMappingActionSearch ¶
func ModuleMappingActionSearch(props ...*moduleMappingActionProps) *moduleMappingAction
ModuleMappingActionSearch returns "federation:module_mapping.search" action
This function is auto-generated.
func ModuleMappingActionUpdate ¶
func ModuleMappingActionUpdate(props ...*moduleMappingActionProps) *moduleMappingAction
ModuleMappingActionUpdate returns "federation:module_mapping.update" action
This function is auto-generated.
func ModuleMappingErrComposeModuleNotFound ¶
ModuleMappingErrComposeModuleNotFound returns "federation:module_mapping.composeModuleNotFound" as *errors.Error
This function is auto-generated.
func ModuleMappingErrComposeNamespaceNotFound ¶
ModuleMappingErrComposeNamespaceNotFound returns "federation:module_mapping.composeNamespaceNotFound" as *errors.Error
This function is auto-generated.
func ModuleMappingErrFederationModuleNotFound ¶
ModuleMappingErrFederationModuleNotFound returns "federation:module_mapping.federationModuleNotFound" as *errors.Error
This function is auto-generated.
func ModuleMappingErrGeneric ¶
ModuleMappingErrGeneric returns "federation:module_mapping.generic" as *errors.Error
This function is auto-generated.
func ModuleMappingErrModuleMappingExists ¶
ModuleMappingErrModuleMappingExists returns "federation:module_mapping.moduleMappingExists" as *errors.Error
This function is auto-generated.
func ModuleMappingErrNodeNotFound ¶
ModuleMappingErrNodeNotFound returns "federation:module_mapping.nodeNotFound" as *errors.Error
This function is auto-generated.
func ModuleMappingErrNotAllowedToMap ¶
ModuleMappingErrNotAllowedToMap returns "federation:module_mapping.notAllowedToMap" as *errors.Error
This function is auto-generated.
func ModuleMappingErrNotFound ¶
ModuleMappingErrNotFound returns "federation:module_mapping.notFound" as *errors.Error
This function is auto-generated.
func Node ¶
func Node(s store.Storer, u service.UserService, al actionlog.Recorder, th tokenIssuer, options options.FederationOpt, sopt options.HttpServerOpt, ac nodeAccessController) *node
func NodeActionCreate ¶
func NodeActionCreate(props ...*nodeActionProps) *nodeAction
NodeActionCreate returns "federation:node.create" action
This function is auto-generated.
func NodeActionCreateFromPairingURI ¶
func NodeActionCreateFromPairingURI(props ...*nodeActionProps) *nodeAction
NodeActionCreateFromPairingURI returns "federation:node.createFromPairingURI" action
This function is auto-generated.
func NodeActionDelete ¶
func NodeActionDelete(props ...*nodeActionProps) *nodeAction
NodeActionDelete returns "federation:node.delete" action
This function is auto-generated.
func NodeActionHandshakeComplete ¶
func NodeActionHandshakeComplete(props ...*nodeActionProps) *nodeAction
NodeActionHandshakeComplete returns "federation:node.handshakeComplete" action
This function is auto-generated.
func NodeActionHandshakeConfirm ¶
func NodeActionHandshakeConfirm(props ...*nodeActionProps) *nodeAction
NodeActionHandshakeConfirm returns "federation:node.handshakeConfirm" action
This function is auto-generated.
func NodeActionHandshakeInit ¶
func NodeActionHandshakeInit(props ...*nodeActionProps) *nodeAction
NodeActionHandshakeInit returns "federation:node.handshakeInit" action
This function is auto-generated.
func NodeActionLookup ¶
func NodeActionLookup(props ...*nodeActionProps) *nodeAction
NodeActionLookup returns "federation:node.lookup" action
This function is auto-generated.
func NodeActionOttRegenerated ¶
func NodeActionOttRegenerated(props ...*nodeActionProps) *nodeAction
NodeActionOttRegenerated returns "federation:node.ottRegenerated" action
This function is auto-generated.
func NodeActionPair ¶
func NodeActionPair(props ...*nodeActionProps) *nodeAction
NodeActionPair returns "federation:node.pair" action
This function is auto-generated.
func NodeActionRecreateFromPairingURI ¶
func NodeActionRecreateFromPairingURI(props ...*nodeActionProps) *nodeAction
NodeActionRecreateFromPairingURI returns "federation:node.recreateFromPairingURI" action
This function is auto-generated.
func NodeActionSearch ¶
func NodeActionSearch(props ...*nodeActionProps) *nodeAction
NodeActionSearch returns "federation:node.search" action
This function is auto-generated.
func NodeActionUndelete ¶
func NodeActionUndelete(props ...*nodeActionProps) *nodeAction
NodeActionUndelete returns "federation:node.undelete" action
This function is auto-generated.
func NodeActionUpdate ¶
func NodeActionUpdate(props ...*nodeActionProps) *nodeAction
NodeActionUpdate returns "federation:node.update" action
This function is auto-generated.
func NodeErrGeneric ¶
NodeErrGeneric returns "federation:node.generic" as *errors.Error
This function is auto-generated.
func NodeErrInvalidID ¶
NodeErrInvalidID returns "federation:node.invalidID" as *errors.Error
This function is auto-generated.
func NodeErrNotAllowedToCreate ¶
NodeErrNotAllowedToCreate returns "federation:node.notAllowedToCreate" as *errors.Error
This function is auto-generated.
func NodeErrNotAllowedToManage ¶
NodeErrNotAllowedToManage returns "federation:node.notAllowedToManage" as *errors.Error
This function is auto-generated.
func NodeErrNotAllowedToPair ¶
NodeErrNotAllowedToPair returns "federation:node.notAllowedToPair" as *errors.Error
This function is auto-generated.
func NodeErrNotAllowedToSearch ¶
NodeErrNotAllowedToSearch returns "federation:node.notAllowedToSearch" as *errors.Error
This function is auto-generated.
func NodeErrNotFound ¶
NodeErrNotFound returns "federation:node.notFound" as *errors.Error
This function is auto-generated.
func NodeErrPairingTokenInvalid ¶
NodeErrPairingTokenInvalid returns "federation:node.pairingTokenInvalid" as *errors.Error
This function is auto-generated.
func NodeErrPairingURIInvalid ¶
NodeErrPairingURIInvalid returns "federation:node.pairingURIInvalid" as *errors.Error
This function is auto-generated.
func NodeErrPairingURISourceIDInvalid ¶
NodeErrPairingURISourceIDInvalid returns "federation:node.pairingURISourceIDInvalid" as *errors.Error
This function is auto-generated.
func NodeErrPairingURITokenInvalid ¶
NodeErrPairingURITokenInvalid returns "federation:node.pairingURITokenInvalid" as *errors.Error
This function is auto-generated.
func NodeSyncActionCreate ¶
func NodeSyncActionCreate(props ...*nodeSyncActionProps) *nodeSyncAction
NodeSyncActionCreate returns "federation:node_sync.create" action
This function is auto-generated.
func NodeSyncActionLookup ¶
func NodeSyncActionLookup(props ...*nodeSyncActionProps) *nodeSyncAction
NodeSyncActionLookup returns "federation:node_sync.lookup" action
This function is auto-generated.
func NodeSyncErrGeneric ¶
NodeSyncErrGeneric returns "federation:node_sync.generic" as *errors.Error
This function is auto-generated.
func NodeSyncErrNodeNotFound ¶
NodeSyncErrNodeNotFound returns "federation:node_sync.nodeNotFound" as *errors.Error
This function is auto-generated.
func NodeSyncErrNotFound ¶
NodeSyncErrNotFound returns "federation:node_sync.notFound" as *errors.Error
This function is auto-generated.
func SharedModule ¶
func SharedModule() *sharedModule
func SharedModuleActionCreate ¶
func SharedModuleActionCreate(props ...*sharedModuleActionProps) *sharedModuleAction
SharedModuleActionCreate returns "federation:shared_module.create" action
This function is auto-generated.
func SharedModuleActionDelete ¶
func SharedModuleActionDelete(props ...*sharedModuleActionProps) *sharedModuleAction
SharedModuleActionDelete returns "federation:shared_module.delete" action
This function is auto-generated.
func SharedModuleActionLookup ¶
func SharedModuleActionLookup(props ...*sharedModuleActionProps) *sharedModuleAction
SharedModuleActionLookup returns "federation:shared_module.lookup" action
This function is auto-generated.
func SharedModuleActionSearch ¶
func SharedModuleActionSearch(props ...*sharedModuleActionProps) *sharedModuleAction
SharedModuleActionSearch returns "federation:shared_module.search" action
This function is auto-generated.
func SharedModuleActionUndelete ¶
func SharedModuleActionUndelete(props ...*sharedModuleActionProps) *sharedModuleAction
SharedModuleActionUndelete returns "federation:shared_module.undelete" action
This function is auto-generated.
func SharedModuleActionUpdate ¶
func SharedModuleActionUpdate(props ...*sharedModuleActionProps) *sharedModuleAction
SharedModuleActionUpdate returns "federation:shared_module.update" action
This function is auto-generated.
func SharedModuleErrFederationSyncStructureChanged ¶
SharedModuleErrFederationSyncStructureChanged returns "federation:shared_module.federationSyncStructureChanged" as *errors.Error
This function is auto-generated.
func SharedModuleErrGeneric ¶
SharedModuleErrGeneric returns "federation:shared_module.generic" as *errors.Error
This function is auto-generated.
func SharedModuleErrInvalidID ¶
SharedModuleErrInvalidID returns "federation:shared_module.invalidID" as *errors.Error
This function is auto-generated.
func SharedModuleErrNodeNotFound ¶
SharedModuleErrNodeNotFound returns "federation:shared_module.nodeNotFound" as *errors.Error
This function is auto-generated.
func SharedModuleErrNotAllowedToCreate ¶
SharedModuleErrNotAllowedToCreate returns "federation:shared_module.notAllowedToCreate" as *errors.Error
This function is auto-generated.
func SharedModuleErrNotAllowedToManage ¶
SharedModuleErrNotAllowedToManage returns "federation:shared_module.notAllowedToManage" as *errors.Error
This function is auto-generated.
func SharedModuleErrNotAllowedToMap ¶
SharedModuleErrNotAllowedToMap returns "federation:shared_module.notAllowedToMap" as *errors.Error
This function is auto-generated.
func SharedModuleErrNotFound ¶
SharedModuleErrNotFound returns "federation:shared_module.notFound" as *errors.Error
This function is auto-generated.
func SharedModuleErrNotUnique ¶
SharedModuleErrNotUnique returns "federation:shared_module.notUnique" as *errors.Error
This function is auto-generated.
func SharedModuleErrStaleData ¶
SharedModuleErrStaleData returns "federation:shared_module.staleData" as *errors.Error
This function is auto-generated.
func WorkerData ¶
func WorkerStructure ¶
Types ¶
type AuxResponseSet ¶
type Config ¶
type Config struct { ActionLog options.ActionLogOpt Storage options.ObjectStoreOpt Federation options.FederationOpt Server options.HttpServerOpt }
type ExposedModuleService ¶
type ExposedModuleService interface { Create(ctx context.Context, new *types.ExposedModule) (*types.ExposedModule, error) Update(ctx context.Context, updated *types.ExposedModule) (*types.ExposedModule, error) Find(ctx context.Context, filter types.ExposedModuleFilter) (types.ExposedModuleSet, types.ExposedModuleFilter, error) FindByID(ctx context.Context, nodeID uint64, moduleID uint64) (*types.ExposedModule, error) DeleteByID(ctx context.Context, nodeID, moduleID uint64) (*types.ExposedModule, error) }
type Mapper ¶
type Mapper struct{}
func (*Mapper) Merge ¶
func (m *Mapper) Merge(in *ct.RecordValueSet, out *ct.RecordValueSet, mappings *types.ModuleFieldMappingSet)
Merge copies the values from originating structure do the destination
mostly, there will be less mapped fields on the destination side, so start looping from here
func (*Mapper) Prepare ¶
func (m *Mapper) Prepare(mappings types.ModuleFieldMappingSet) (out ct.RecordValueSet)
Prepare creates a set of Records to be used later when the fields will be mapped via Merge()
type ModuleMappingService ¶
type ModuleMappingService interface { Find(ctx context.Context, filter types.ModuleMappingFilter) (types.ModuleMappingSet, types.ModuleMappingFilter, error) FindByID(ctx context.Context, federationModuleID uint64) (*types.ModuleMapping, error) Create(ctx context.Context, new *types.ModuleMapping) (*types.ModuleMapping, error) Update(ctx context.Context, updated *types.ModuleMapping) (*types.ModuleMapping, error) }
type NodeSyncService ¶
type NodeSyncService interface { Create(ctx context.Context, new *types.NodeSync) (*types.NodeSync, error) Search(ctx context.Context, f types.NodeSyncFilter) (types.NodeSyncSet, types.NodeSyncFilter, error) LookupLastSuccessfulSync(ctx context.Context, nodeID uint64, syncType string) (*types.NodeSync, error) }
func NodeSync ¶
func NodeSync() NodeSyncService
type Processer ¶
type Processer interface {
Process(ctx context.Context, payload []byte) (ProcesserResponse, error)
}
type ProcesserResponse ¶
type ProcesserResponse interface{}
type SharedModuleService ¶
type SharedModuleService interface {}
type Sync ¶
type Sync struct {
// contains filtered or unexported fields
}
func NewSync ¶
func NewSync(s *Syncer, m *Mapper, sm SharedModuleService, cs cs.RecordService, us ss.UserService, rs ss.RoleService) *Sync
func (*Sync) CanUpdateSharedModule ¶
func (s *Sync) CanUpdateSharedModule(ctx context.Context, new *types.SharedModule, existing *types.SharedModule) (bool, error)
CanUpdateSharedModule checks the origin and destination module compatibility of fields It currently checks if all of the fields are exactly the same TODO - check if any of the newly missing fields are actually being used so a safe update is possible
func (*Sync) CreateRecord ¶
CreateRecord wraps the compose Record service Create
func (*Sync) CreateSharedModule ¶
func (s *Sync) CreateSharedModule(ctx context.Context, new *types.SharedModule) (*types.SharedModule, error)
CreateSharedModule wraps the federation SharedModule service Create
func (*Sync) DeleteRecord ¶
DeleteRecord wraps the compose Record service Update
func (*Sync) FindRecords ¶
func (s *Sync) FindRecords(ctx context.Context, filter ct.RecordFilter) (set ct.RecordSet, err error)
FindRecord find the record via federation label
func (*Sync) GetLastStructureSyncStatus ¶
func (*Sync) GetLastSyncTime ¶
func (*Sync) GetModuleMappings ¶
func (*Sync) GetPairedNodes ¶
GetPairedNodes finds successfuly paired nodes
func (*Sync) GetSharedModules ¶
func (*Sync) LoadUserWithRoles ¶
LoadUserWithRoles gets the federation user, that was created at node pairing process
func (*Sync) LookupSharedModule ¶
func (s *Sync) LookupSharedModule(ctx context.Context, new *types.SharedModule) (*types.SharedModule, error)
LookupSharedModule find the shared module if exists
func (*Sync) PrepareModuleMappings ¶
func (s *Sync) PrepareModuleMappings(ctx context.Context, mappings *types.ModuleMapping) (ct.RecordValueSet, error)
func (*Sync) ProcessPayload ¶
func (s *Sync) ProcessPayload(ctx context.Context, payload []byte, out chan Url, url types.SyncerURI, processer Processer) (ProcesserResponse, error)
ProcessPayload passes the payload to the syncer lib
func (*Sync) UpdateRecord ¶
UpdateRecord wraps the compose Record service Update
func (*Sync) UpdateSharedModule ¶
func (s *Sync) UpdateSharedModule(ctx context.Context, updated *types.SharedModule) (*types.SharedModule, error)
UpdateSharedModule wraps the federation SharedModule service Update
Source Files ¶
- access_control.gen.go
- access_control_actions.gen.go
- exposed_module.go
- exposed_module_actions.gen.go
- mapper.go
- module_mapping.go
- module_mapping_actions.gen.go
- node.go
- node_actions.gen.go
- node_handshaker.go
- node_sync.go
- node_sync_actions.gen.go
- processer.go
- processer_data.go
- processer_structure.go
- service.go
- shared_module.go
- shared_module_actions.gen.go
- sync.go
- sync_worker.go
- sync_worker_data.go
- sync_worker_structure.go
- syncer.go