Documentation ¶
Index ¶
- Variables
- func InitDB() error
- type CertificateAuthorityRepo
- type CertificateBindingRepo
- func (r *CertificateBindingRepo) Create(instance interface{}) error
- func (r *CertificateBindingRepo) DeleteByParticipantUUID(participantUUID string) error
- func (r *CertificateBindingRepo) InitTable()
- func (r *CertificateBindingRepo) ListByCertificateUUID(certificateUUID string) (interface{}, error)
- func (r *CertificateBindingRepo) ListByParticipantUUID(participantUUID string) (interface{}, error)
- type CertificateRepo
- func (r *CertificateRepo) Create(instance interface{}) error
- func (r *CertificateRepo) DeleteByUUID(uuid string) error
- func (r *CertificateRepo) GetBySerialNumber(serialNumberStr string) (interface{}, error)
- func (r *CertificateRepo) GetByUUID(uuid string) (interface{}, error)
- func (r *CertificateRepo) InitTable()
- func (r *CertificateRepo) List() (interface{}, error)
- type ChartMockRepo
- func (r *ChartMockRepo) Create(instance interface{}) error
- func (r *ChartMockRepo) DeleteByUUID(uuid string) error
- func (r *ChartMockRepo) GetByNameAndVersion(chartName, version string) (interface{}, error)
- func (r *ChartMockRepo) GetByUUID(uuid string) (interface{}, error)
- func (r *ChartMockRepo) List() (interface{}, error)
- func (r *ChartMockRepo) ListByType(instance interface{}) (interface{}, error)
- type EndpointKubeFATERepo
- func (r *EndpointKubeFATERepo) Create(instance interface{}) error
- func (r *EndpointKubeFATERepo) DeleteByUUID(uuid string) error
- func (r *EndpointKubeFATERepo) GetByUUID(uuid string) (interface{}, error)
- func (r *EndpointKubeFATERepo) InitTable()
- func (r *EndpointKubeFATERepo) List() (interface{}, error)
- func (r *EndpointKubeFATERepo) ListByInfraProviderUUID(infraUUID string) (interface{}, error)
- func (r *EndpointKubeFATERepo) ListByInfraProviderUUIDAndNamespace(infraUUID string, namespace string) (interface{}, error)
- func (r *EndpointKubeFATERepo) UpdateInfoByUUID(instance interface{}) error
- func (r *EndpointKubeFATERepo) UpdateStatusByUUID(instance interface{}) error
- type EventRepo
- type FederationFATERepo
- type FederationOpenFLRepo
- func (r *FederationOpenFLRepo) Create(instance interface{}) error
- func (r *FederationOpenFLRepo) DeleteByUUID(uuid string) error
- func (r *FederationOpenFLRepo) GetByUUID(uuid string) (interface{}, error)
- func (r *FederationOpenFLRepo) InitTable()
- func (r *FederationOpenFLRepo) List() (interface{}, error)
- type InfraProviderKubernetesRepo
- func (r *InfraProviderKubernetesRepo) Create(instance interface{}) error
- func (r *InfraProviderKubernetesRepo) DeleteByUUID(uuid string) error
- func (r *InfraProviderKubernetesRepo) GetByConfigSHA256(sha256 string) (interface{}, error)
- func (r *InfraProviderKubernetesRepo) GetByUUID(uuid string) (interface{}, error)
- func (r *InfraProviderKubernetesRepo) InitTable()
- func (r *InfraProviderKubernetesRepo) List() (interface{}, error)
- func (r *InfraProviderKubernetesRepo) ProviderExists(instance interface{}) error
- func (r *InfraProviderKubernetesRepo) UpdateByUUID(instance interface{}) error
- type ParticipantFATERepo
- func (r *ParticipantFATERepo) Create(instance interface{}) error
- func (r *ParticipantFATERepo) DeleteByUUID(uuid string) error
- func (r *ParticipantFATERepo) GetByUUID(uuid string) (interface{}, error)
- func (r *ParticipantFATERepo) GetExchangeByFederationUUID(uuid string) (interface{}, error)
- func (r *ParticipantFATERepo) InitTable()
- func (r *ParticipantFATERepo) IsConflictedByFederationUUIDAndPartyID(federationUUID string, partyID int) (bool, error)
- func (r *ParticipantFATERepo) IsExchangeCreatedByFederationUUID(uuid string) (bool, error)
- func (r *ParticipantFATERepo) List() (interface{}, error)
- func (r *ParticipantFATERepo) ListByEndpointUUID(endpointUUID string) (interface{}, error)
- func (r *ParticipantFATERepo) ListByFederationUUID(federationUUID string) (interface{}, error)
- func (r *ParticipantFATERepo) UpdateDeploymentYAMLByUUID(instance interface{}) error
- func (r *ParticipantFATERepo) UpdateInfoByUUID(instance interface{}) error
- func (r *ParticipantFATERepo) UpdateStatusByUUID(instance interface{}) error
- type ParticipantOpenFLRepo
- func (r *ParticipantOpenFLRepo) CountByTokenUUID(uuid string) (int, error)
- func (r *ParticipantOpenFLRepo) Create(instance interface{}) error
- func (r *ParticipantOpenFLRepo) DeleteByUUID(uuid string) error
- func (r *ParticipantOpenFLRepo) GetByUUID(uuid string) (interface{}, error)
- func (r *ParticipantOpenFLRepo) GetDirectorByFederationUUID(uuid string) (interface{}, error)
- func (r *ParticipantOpenFLRepo) InitTable()
- func (r *ParticipantOpenFLRepo) IsDirectorCreatedByFederationUUID(uuid string) (bool, error)
- func (r *ParticipantOpenFLRepo) List() (interface{}, error)
- func (r *ParticipantOpenFLRepo) ListByEndpointUUID(endpointUUID string) (interface{}, error)
- func (r *ParticipantOpenFLRepo) ListByFederationUUID(federationUUID string) (interface{}, error)
- func (r *ParticipantOpenFLRepo) UpdateDeploymentYAMLByUUID(instance interface{}) error
- func (r *ParticipantOpenFLRepo) UpdateInfoByUUID(instance interface{}) error
- func (r *ParticipantOpenFLRepo) UpdateStatusByUUID(instance interface{}) error
- type RegistrationTokenOpenFLRepo
- func (r *RegistrationTokenOpenFLRepo) Create(instance interface{}) error
- func (r *RegistrationTokenOpenFLRepo) DeleteByFederation(federationUUID string) error
- func (r *RegistrationTokenOpenFLRepo) DeleteByUUID(uuid string) error
- func (r *RegistrationTokenOpenFLRepo) GetByUUID(uuid string) (interface{}, error)
- func (r *RegistrationTokenOpenFLRepo) InitTable()
- func (r *RegistrationTokenOpenFLRepo) ListByFederation(federationUUID string) (interface{}, error)
- func (r *RegistrationTokenOpenFLRepo) LoadByTypeAndStr(instance interface{}) error
- type UserRepo
- func (r *UserRepo) CreateUser(instance interface{}) error
- func (r *UserRepo) GetByName(name string) (*entity.User, error)
- func (r *UserRepo) InitData()
- func (r *UserRepo) InitTable()
- func (r *UserRepo) LoadById(instance interface{}) error
- func (r *UserRepo) LoadByName(instance interface{}) error
- func (r *UserRepo) UpdateByName(updatedUser *entity.User) error
- func (r *UserRepo) UpdatePasswordById(id uint, hashedPassword string) error
Constants ¶
This section is empty.
Variables ¶
var ErrCertificateAuthorityExist = errors.New("CA already exists")
ErrCertificateAuthorityExist means new CA cannot be created due to the existence of the same-name CA
var ErrEndpointExist = errors.New("endpoint already exists")
ErrEndpointExist means new endpoint cannot be created due to the existence of the same-name endpoint
var ErrFederationExist = errors.New("federation already exists")
ErrFederationExist means new federation cannot be created due to the existence of the same-name federation
var ErrParticipantExist = errors.New("participant already exists")
ErrParticipantExist means new participant cannot be created due to name conflicts
var ErrTokenExist = errors.New("token already exists")
ErrTokenExist means new token cannot be created due to name conflicts
var ErrUserExist = errors.New("user already exists")
ErrUserExist means new user cannot be created due to the existence of the same-name user
Functions ¶
Types ¶
type CertificateAuthorityRepo ¶
type CertificateAuthorityRepo struct{}
CertificateAuthorityRepo is the implementation of the repo.CertificateAuthorityRepository interface
func (*CertificateAuthorityRepo) Create ¶
func (r *CertificateAuthorityRepo) Create(instance interface{}) error
func (*CertificateAuthorityRepo) GetFirst ¶
func (r *CertificateAuthorityRepo) GetFirst() (interface{}, error)
func (*CertificateAuthorityRepo) InitTable ¶
func (r *CertificateAuthorityRepo) InitTable()
InitTable makes sure the table is created in the db
func (*CertificateAuthorityRepo) UpdateByUUID ¶
func (r *CertificateAuthorityRepo) UpdateByUUID(instance interface{}) error
type CertificateBindingRepo ¶
type CertificateBindingRepo struct{}
CertificateBindingRepo is the implementation of the repo.CertificateBindingRepository interface
func (*CertificateBindingRepo) Create ¶
func (r *CertificateBindingRepo) Create(instance interface{}) error
func (*CertificateBindingRepo) DeleteByParticipantUUID ¶
func (r *CertificateBindingRepo) DeleteByParticipantUUID(participantUUID string) error
func (*CertificateBindingRepo) InitTable ¶
func (r *CertificateBindingRepo) InitTable()
InitTable makes sure the table is created in the db
func (*CertificateBindingRepo) ListByCertificateUUID ¶
func (r *CertificateBindingRepo) ListByCertificateUUID(certificateUUID string) (interface{}, error)
func (*CertificateBindingRepo) ListByParticipantUUID ¶
func (r *CertificateBindingRepo) ListByParticipantUUID(participantUUID string) (interface{}, error)
type CertificateRepo ¶
type CertificateRepo struct{}
CertificateRepo is the implementation of the repo.CertificateRepository interface
func (*CertificateRepo) Create ¶
func (r *CertificateRepo) Create(instance interface{}) error
func (*CertificateRepo) DeleteByUUID ¶
func (r *CertificateRepo) DeleteByUUID(uuid string) error
func (*CertificateRepo) GetBySerialNumber ¶
func (r *CertificateRepo) GetBySerialNumber(serialNumberStr string) (interface{}, error)
func (*CertificateRepo) GetByUUID ¶
func (r *CertificateRepo) GetByUUID(uuid string) (interface{}, error)
func (*CertificateRepo) InitTable ¶
func (r *CertificateRepo) InitTable()
InitTable makes sure the table is created in the db
func (*CertificateRepo) List ¶
func (r *CertificateRepo) List() (interface{}, error)
type ChartMockRepo ¶
type ChartMockRepo struct{}
ChartMockRepo is the implementation of the repo.ChartRepository interface The data is hard-coded for now as the template to generate the final yaml content is hard to be customized by the end users.
func (*ChartMockRepo) Create ¶
func (r *ChartMockRepo) Create(instance interface{}) error
func (*ChartMockRepo) DeleteByUUID ¶
func (r *ChartMockRepo) DeleteByUUID(uuid string) error
func (*ChartMockRepo) GetByNameAndVersion ¶ added in v0.3.0
func (r *ChartMockRepo) GetByNameAndVersion(chartName, version string) (interface{}, error)
func (*ChartMockRepo) GetByUUID ¶
func (r *ChartMockRepo) GetByUUID(uuid string) (interface{}, error)
func (*ChartMockRepo) List ¶
func (r *ChartMockRepo) List() (interface{}, error)
func (*ChartMockRepo) ListByType ¶
func (r *ChartMockRepo) ListByType(instance interface{}) (interface{}, error)
type EndpointKubeFATERepo ¶
type EndpointKubeFATERepo struct{}
EndpointKubeFATERepo is the implementation of the repo.EndpointRepository interface
func (*EndpointKubeFATERepo) Create ¶
func (r *EndpointKubeFATERepo) Create(instance interface{}) error
func (*EndpointKubeFATERepo) DeleteByUUID ¶
func (r *EndpointKubeFATERepo) DeleteByUUID(uuid string) error
func (*EndpointKubeFATERepo) GetByUUID ¶
func (r *EndpointKubeFATERepo) GetByUUID(uuid string) (interface{}, error)
func (*EndpointKubeFATERepo) InitTable ¶
func (r *EndpointKubeFATERepo) InitTable()
InitTable makes sure the table is created in the db
func (*EndpointKubeFATERepo) List ¶
func (r *EndpointKubeFATERepo) List() (interface{}, error)
func (*EndpointKubeFATERepo) ListByInfraProviderUUID ¶
func (r *EndpointKubeFATERepo) ListByInfraProviderUUID(infraUUID string) (interface{}, error)
func (*EndpointKubeFATERepo) ListByInfraProviderUUIDAndNamespace ¶ added in v0.2.0
func (r *EndpointKubeFATERepo) ListByInfraProviderUUIDAndNamespace(infraUUID string, namespace string) (interface{}, error)
func (*EndpointKubeFATERepo) UpdateInfoByUUID ¶
func (r *EndpointKubeFATERepo) UpdateInfoByUUID(instance interface{}) error
func (*EndpointKubeFATERepo) UpdateStatusByUUID ¶
func (r *EndpointKubeFATERepo) UpdateStatusByUUID(instance interface{}) error
type EventRepo ¶
type EventRepo struct{}
EventRepo is the implementation of the repo.EventRepository interface
func (*EventRepo) InitTable ¶
func (r *EventRepo) InitTable()
InitTable makes sure the table is created in the db
func (*EventRepo) ListByEntityUUID ¶
type FederationFATERepo ¶
type FederationFATERepo struct{}
FederationFATERepo implements the repo.FederationRepository interface
func (*FederationFATERepo) Create ¶
func (r *FederationFATERepo) Create(instance interface{}) error
func (*FederationFATERepo) DeleteByUUID ¶
func (r *FederationFATERepo) DeleteByUUID(uuid string) error
func (*FederationFATERepo) GetByUUID ¶
func (r *FederationFATERepo) GetByUUID(uuid string) (interface{}, error)
func (*FederationFATERepo) InitTable ¶
func (r *FederationFATERepo) InitTable()
InitTable makes sure the table is created in the db
func (*FederationFATERepo) List ¶
func (r *FederationFATERepo) List() (interface{}, error)
type FederationOpenFLRepo ¶
type FederationOpenFLRepo struct{}
FederationOpenFLRepo implements the repo.FederationRepository interface
func (*FederationOpenFLRepo) Create ¶
func (r *FederationOpenFLRepo) Create(instance interface{}) error
func (*FederationOpenFLRepo) DeleteByUUID ¶
func (r *FederationOpenFLRepo) DeleteByUUID(uuid string) error
func (*FederationOpenFLRepo) GetByUUID ¶
func (r *FederationOpenFLRepo) GetByUUID(uuid string) (interface{}, error)
func (*FederationOpenFLRepo) InitTable ¶
func (r *FederationOpenFLRepo) InitTable()
InitTable makes sure the table is created in the db
func (*FederationOpenFLRepo) List ¶
func (r *FederationOpenFLRepo) List() (interface{}, error)
type InfraProviderKubernetesRepo ¶
type InfraProviderKubernetesRepo struct{}
InfraProviderKubernetesRepo is the implementation of the repo.InfraProviderRepository interface
func (*InfraProviderKubernetesRepo) Create ¶
func (r *InfraProviderKubernetesRepo) Create(instance interface{}) error
Create creates a record in the DB
func (*InfraProviderKubernetesRepo) DeleteByUUID ¶
func (r *InfraProviderKubernetesRepo) DeleteByUUID(uuid string) error
DeleteByUUID deletes records using the specified uuid
func (*InfraProviderKubernetesRepo) GetByConfigSHA256 ¶ added in v0.2.0
func (r *InfraProviderKubernetesRepo) GetByConfigSHA256(sha256 string) (interface{}, error)
func (*InfraProviderKubernetesRepo) GetByUUID ¶
func (r *InfraProviderKubernetesRepo) GetByUUID(uuid string) (interface{}, error)
GetByUUID returns the specified provider
func (*InfraProviderKubernetesRepo) InitTable ¶
func (r *InfraProviderKubernetesRepo) InitTable()
InitTable makes sure the table is created in the db
func (*InfraProviderKubernetesRepo) List ¶
func (r *InfraProviderKubernetesRepo) List() (interface{}, error)
List returns provider list
func (*InfraProviderKubernetesRepo) ProviderExists ¶
func (r *InfraProviderKubernetesRepo) ProviderExists(instance interface{}) error
ProviderExists checks if a provider already exists in database according to provider's name and config_sha256
func (*InfraProviderKubernetesRepo) UpdateByUUID ¶
func (r *InfraProviderKubernetesRepo) UpdateByUUID(instance interface{}) error
type ParticipantFATERepo ¶
type ParticipantFATERepo struct{}
ParticipantFATERepo implements the repo.ParticipantFATERepository interface
func (*ParticipantFATERepo) Create ¶
func (r *ParticipantFATERepo) Create(instance interface{}) error
func (*ParticipantFATERepo) DeleteByUUID ¶
func (r *ParticipantFATERepo) DeleteByUUID(uuid string) error
func (*ParticipantFATERepo) GetByUUID ¶
func (r *ParticipantFATERepo) GetByUUID(uuid string) (interface{}, error)
func (*ParticipantFATERepo) GetExchangeByFederationUUID ¶
func (r *ParticipantFATERepo) GetExchangeByFederationUUID(uuid string) (interface{}, error)
func (*ParticipantFATERepo) InitTable ¶
func (r *ParticipantFATERepo) InitTable()
InitTable makes sure the table is created in the db
func (*ParticipantFATERepo) IsConflictedByFederationUUIDAndPartyID ¶
func (r *ParticipantFATERepo) IsConflictedByFederationUUIDAndPartyID(federationUUID string, partyID int) (bool, error)
func (*ParticipantFATERepo) IsExchangeCreatedByFederationUUID ¶
func (r *ParticipantFATERepo) IsExchangeCreatedByFederationUUID(uuid string) (bool, error)
func (*ParticipantFATERepo) List ¶
func (r *ParticipantFATERepo) List() (interface{}, error)
func (*ParticipantFATERepo) ListByEndpointUUID ¶
func (r *ParticipantFATERepo) ListByEndpointUUID(endpointUUID string) (interface{}, error)
func (*ParticipantFATERepo) ListByFederationUUID ¶
func (r *ParticipantFATERepo) ListByFederationUUID(federationUUID string) (interface{}, error)
func (*ParticipantFATERepo) UpdateDeploymentYAMLByUUID ¶
func (r *ParticipantFATERepo) UpdateDeploymentYAMLByUUID(instance interface{}) error
func (*ParticipantFATERepo) UpdateInfoByUUID ¶
func (r *ParticipantFATERepo) UpdateInfoByUUID(instance interface{}) error
func (*ParticipantFATERepo) UpdateStatusByUUID ¶
func (r *ParticipantFATERepo) UpdateStatusByUUID(instance interface{}) error
type ParticipantOpenFLRepo ¶
type ParticipantOpenFLRepo struct{}
ParticipantOpenFLRepo implements repo.ParticipantOpenFLRepository interface
func (*ParticipantOpenFLRepo) CountByTokenUUID ¶
func (r *ParticipantOpenFLRepo) CountByTokenUUID(uuid string) (int, error)
func (*ParticipantOpenFLRepo) Create ¶
func (r *ParticipantOpenFLRepo) Create(instance interface{}) error
func (*ParticipantOpenFLRepo) DeleteByUUID ¶
func (r *ParticipantOpenFLRepo) DeleteByUUID(uuid string) error
func (*ParticipantOpenFLRepo) GetByUUID ¶
func (r *ParticipantOpenFLRepo) GetByUUID(uuid string) (interface{}, error)
func (*ParticipantOpenFLRepo) GetDirectorByFederationUUID ¶
func (r *ParticipantOpenFLRepo) GetDirectorByFederationUUID(uuid string) (interface{}, error)
func (*ParticipantOpenFLRepo) InitTable ¶
func (r *ParticipantOpenFLRepo) InitTable()
InitTable makes sure the table is created in the db
func (*ParticipantOpenFLRepo) IsDirectorCreatedByFederationUUID ¶
func (r *ParticipantOpenFLRepo) IsDirectorCreatedByFederationUUID(uuid string) (bool, error)
func (*ParticipantOpenFLRepo) List ¶
func (r *ParticipantOpenFLRepo) List() (interface{}, error)
func (*ParticipantOpenFLRepo) ListByEndpointUUID ¶
func (r *ParticipantOpenFLRepo) ListByEndpointUUID(endpointUUID string) (interface{}, error)
func (*ParticipantOpenFLRepo) ListByFederationUUID ¶
func (r *ParticipantOpenFLRepo) ListByFederationUUID(federationUUID string) (interface{}, error)
func (*ParticipantOpenFLRepo) UpdateDeploymentYAMLByUUID ¶
func (r *ParticipantOpenFLRepo) UpdateDeploymentYAMLByUUID(instance interface{}) error
func (*ParticipantOpenFLRepo) UpdateInfoByUUID ¶
func (r *ParticipantOpenFLRepo) UpdateInfoByUUID(instance interface{}) error
func (*ParticipantOpenFLRepo) UpdateStatusByUUID ¶
func (r *ParticipantOpenFLRepo) UpdateStatusByUUID(instance interface{}) error
type RegistrationTokenOpenFLRepo ¶
type RegistrationTokenOpenFLRepo struct{}
RegistrationTokenOpenFLRepo implements repo.RegistrationTokenRepository interface
func (*RegistrationTokenOpenFLRepo) Create ¶
func (r *RegistrationTokenOpenFLRepo) Create(instance interface{}) error
func (*RegistrationTokenOpenFLRepo) DeleteByFederation ¶
func (r *RegistrationTokenOpenFLRepo) DeleteByFederation(federationUUID string) error
func (*RegistrationTokenOpenFLRepo) DeleteByUUID ¶
func (r *RegistrationTokenOpenFLRepo) DeleteByUUID(uuid string) error
func (*RegistrationTokenOpenFLRepo) GetByUUID ¶
func (r *RegistrationTokenOpenFLRepo) GetByUUID(uuid string) (interface{}, error)
func (*RegistrationTokenOpenFLRepo) InitTable ¶
func (r *RegistrationTokenOpenFLRepo) InitTable()
InitTable makes sure the table is created in the db
func (*RegistrationTokenOpenFLRepo) ListByFederation ¶
func (r *RegistrationTokenOpenFLRepo) ListByFederation(federationUUID string) (interface{}, error)
func (*RegistrationTokenOpenFLRepo) LoadByTypeAndStr ¶
func (r *RegistrationTokenOpenFLRepo) LoadByTypeAndStr(instance interface{}) error
type UserRepo ¶
type UserRepo struct{}
UserRepo implements repo.UserRepository using gorm and PostgreSQL
func (*UserRepo) CreateUser ¶
CreateUser creates a new user
func (*UserRepo) InitData ¶
func (r *UserRepo) InitData()
InitData inserts a default users information
func (*UserRepo) InitTable ¶
func (r *UserRepo) InitTable()
InitTable makes sure the table is created in the db
func (*UserRepo) LoadByName ¶
LoadByName loads the user info by name
func (*UserRepo) UpdateByName ¶
UpdateByName changes the specified user's info
Source Files ¶
- certificate_authority_repo.go
- certificate_binding_repo.go
- certificate_repo.go
- chart_mock_repo.go
- database.go
- endpoint_kubefate_repo.go
- event_repo.go
- federation_fate_repo.go
- federation_openfl_repo.go
- infra_provider_kubernetes_repo.go
- participant_fate_repo.go
- participate_openfl_repo.go
- registration_token_openfl_repo.go
- user_repo.go