Documentation ¶
Index ¶
- Variables
- type CertificateAuthorityRepository
- type CertificateBindingRepository
- type CertificateRepository
- type ChartRepository
- type EndpointRepository
- type EventRepository
- type FederationRepository
- type InfraProviderRepository
- type ParticipantFATERepository
- type ParticipantOpenFLRepository
- type ParticipantRepository
- type RegistrationTokenRepository
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
var ErrProviderExist = errors.New("provider already exists")
ErrProviderExist means new provider cannot be created due to the existence of the same-name provider
Functions ¶
This section is empty.
Types ¶
type CertificateAuthorityRepository ¶
type CertificateAuthorityRepository interface { // Create takes an *entity.CertificateAuthority and creates a record in the repository Create(interface{}) error // UpdateByUUID takes an *entity.CertificateAuthority and updates the ca info UpdateByUUID(interface{}) error // GetFirst returns the first *entity.CertificateAuthority GetFirst() (interface{}, error) }
CertificateAuthorityRepository is the interface to handle certificate authority's persistence related actions
type CertificateBindingRepository ¶
type CertificateBindingRepository interface { // Create takes a *entity.CertificateBinding and creates a record in the repository Create(interface{}) error // ListByCertificateUUID returns []entity.CertificateBinding of the specified certificate ListByCertificateUUID(string) (interface{}, error) // DeleteByParticipantUUID deletes certificate binding info with the specified participant uuid DeleteByParticipantUUID(string) error // ListByParticipantUUID returns []entity.CertificateBinding of the specified participant uuid ListByParticipantUUID(string) (interface{}, error) }
CertificateBindingRepository is the interface to handle certificate binding's persistence related actions
type CertificateRepository ¶
type CertificateRepository interface { // Create takes a *entity.Certificate and creates a record in the repository Create(interface{}) error // List returns []entity.Certificate of all saved certificates List() (interface{}, error) // DeleteByUUID deletes certificate info with the specified uuid DeleteByUUID(string) error // GetByUUID returns an *entity.Certificate with the specified UUID GetByUUID(string) (interface{}, error) // GetBySerialNumber returns an *entity.Certificate with the specified serial number GetBySerialNumber(string) (interface{}, error) }
CertificateRepository is the interface to handle certificate's persistence related actions
type ChartRepository ¶
type ChartRepository interface { // Create takes a *entity.Chart creates a chart info record in the repository Create(interface{}) error // List returns []entity.Chart of all saved chart List() (interface{}, error) // DeleteByUUID delete the chart of the specified uuid DeleteByUUID(string) error // GetByUUID returns an *entity.Chart of the specified uuid GetByUUID(string) (interface{}, error) // GetByNameAndNamespace returns an *entity.Chart of the specified name and version GetByNameAndVersion(string, string) (interface{}, error) // ListByType takes an entity.ChartType and returns []entity.Chart that is for the specified type ListByType(interface{}) (interface{}, error) }
ChartRepository is the interface to handle chart's persistence related actions
type EndpointRepository ¶
type EndpointRepository interface { // Create takes a *entity.EndpointBase or its derived struct instance and creates an endpoint info record in the repository Create(interface{}) error // List returns []entity.EndpointBase or derived struct instances list List() (interface{}, error) // DeleteByUUID delete the endpoint record with the specified uuid DeleteByUUID(string) error // GetByUUID returns an *entity.EndpointBase or its derived struct of the specified uuid GetByUUID(string) (interface{}, error) // ListByInfraProviderUUID returns []entity.EndpointBase or derived struct instances list that contain the specified infra uuid ListByInfraProviderUUID(string) (interface{}, error) // ListByInfraProviderUUIDAndNamespace returns entity.EndpointBase or derived struct instance that contain the specified infra uuid and namespace ListByInfraProviderUUIDAndNamespace(string, string) (interface{}, error) // UpdateStatusByUUID takes an *entity.EndpointBase or its derived struct and updates the status field UpdateStatusByUUID(interface{}) error // UpdateInfoByUUID takes an *entity.EndpointBase or its derived struct and updates endpoint editable fields UpdateInfoByUUID(interface{}) error }
EndpointRepository is the interface to handle endpoint's persistence related actions
type EventRepository ¶
type EventRepository interface { // Create takes a *entity.Event and creates an event record in the repository Create(interface{}) error // ListByEntityUUID returns []entity.Event instances list that contain the specified entity uuid ListByEntityUUID(string) (interface{}, error) }
EventRepository is the interface to handle event's persistence related actions
type FederationRepository ¶
type FederationRepository interface { // Create takes a *entity.Federation's derived struct and creates a federation record in the repository Create(interface{}) error // List returns federation list containing entity.Federation's derived struct, such as []entity.FederationFATE List() (interface{}, error) // DeleteByUUID delete federation with the specified uuid DeleteByUUID(string) error // GetByUUID returns an *entity.Federation's derived struct of the specified federation GetByUUID(string) (interface{}, error) }
FederationRepository is the interface to handle federation's persistence related actions
type InfraProviderRepository ¶
type InfraProviderRepository interface { // Create takes a *entity.InfraProviderBase's derived struct and creates a provider info record in the repository Create(interface{}) error // List returns provider info list, currently []entity.InfraProviderKubernetes List() (interface{}, error) // DeleteByUUID delete provider info with the specified uuid DeleteByUUID(string) error // GetByUUID returns an *entity.InfraProviderBase or its derived struct of the specified provider GetByUUID(string) (interface{}, error) // UpdateByUUID takes an *entity.InfraProviderBase or its derived struct and updates the infra provider config by uuid UpdateByUUID(interface{}) error // GetByConfigSHA256 returns an *entity.InfraProviderBase or its derived struct who contains the specified kubeconfig content GetByConfigSHA256(string) (interface{}, error) // ProviderExists checks if a provider already exists in the database ProviderExists(interface{}) error }
InfraProviderRepository is the interface to handle infra provider's persistence related actions
type ParticipantFATERepository ¶
type ParticipantFATERepository interface { ParticipantRepository // IsExchangeCreatedByFederationUUID returns whether an exchange exists in the specified federation IsExchangeCreatedByFederationUUID(string) (bool, error) // GetExchangeByFederationUUID returns an *entity.ParticipantFATE that is the exchange of the specified federation GetExchangeByFederationUUID(string) (interface{}, error) // IsConflictedByFederationUUIDAndPartyID returns whether a party id in a federation is already used IsConflictedByFederationUUIDAndPartyID(string, int) (bool, error) }
ParticipantFATERepository contains FATE participant specific operations in addition to ParticipantRepository
type ParticipantOpenFLRepository ¶
type ParticipantOpenFLRepository interface { ParticipantRepository // IsDirectorCreatedByFederationUUID returns whether a director exists in the specified federation IsDirectorCreatedByFederationUUID(string) (bool, error) // CountByTokenUUID returns the number of participant using a specified token CountByTokenUUID(string) (int, error) // GetDirectorByFederationUUID returns an *entity.ParticipantOpenFL that is the director of the specified federation GetDirectorByFederationUUID(string) (interface{}, error) }
ParticipantOpenFLRepository contains OpenFL specific operations in addition to ParticipantRepository
type ParticipantRepository ¶
type ParticipantRepository interface { // Create takes an *entity.Participant's derived struct and creates a fate participant info record in the repo Create(interface{}) error // List returns []entity.Participant's derived struct list List() (interface{}, error) // DeleteByUUID deletes participant info with the specified uuid DeleteByUUID(string) error // GetByUUID returns an *entity.Participant's derived struct of the specified uuid GetByUUID(string) (interface{}, error) // ListByFederationUUID returns []entity.Participant's derived struct list that contain the specified federation uuid ListByFederationUUID(string) (interface{}, error) // ListByEndpointUUID returns []entity.Participant's derived struct list that contain the specified endpoint uuid ListByEndpointUUID(string) (interface{}, error) // UpdateStatusByUUID takes an *entity.Participant's derived struct and updates the status field UpdateStatusByUUID(interface{}) error // UpdateDeploymentYAMLByUUID takes an *entity.Participant's derived struct and updates the deployment_yaml field UpdateDeploymentYAMLByUUID(interface{}) error // UpdateInfoByUUID takes a *entity.Participant and updates the participant editable fields UpdateInfoByUUID(interface{}) error }
ParticipantRepository contains common repo interface to work with federation participants
type RegistrationTokenRepository ¶
type RegistrationTokenRepository interface { // Create takes an *entity.RegistrationToken's derived struct and creates a record in the repository Create(interface{}) error // ListByFederation returns token list, currently []entity.RegistrationTokenOpenFL ListByFederation(string) (interface{}, error) // DeleteByUUID delete the token with the specified uuid DeleteByUUID(string) error // GetByUUID returns an *entity.RegistrationToken's derived struct of the specified uuid GetByUUID(string) (interface{}, error) // LoadByTypeAndStr takes an *entity.RegistrationToken's derived struct and fill it with missing info based on the type and token string LoadByTypeAndStr(interface{}) error // DeleteByFederation deletes all tokens within the specified federation DeleteByFederation(string) error }
RegistrationTokenRepository is the interface to handle federation's registration token related actions
type UserRepository ¶
type UserRepository interface { // CreateUser takes an *entity.User and creates a new user record in the repo CreateUser(user interface{}) error // LoadById takes an *entity.User and loads info of a user with the specified id from the repo into it LoadById(user interface{}) error // LoadByName takes an *entity.User loads info of a user with the specified name from the repo into it LoadByName(user interface{}) error // UpdatePasswordById updates a users password UpdatePasswordById(id uint, newPassword string) error }
UserRepository holds methods to access user repos