Documentation ¶
Index ¶
- func ValidateRegistrationNumberType(fl validator.FieldLevel) bool
- type Compliance
- type Compliance2210
- func (c *Compliance2210) GaiaXSignParticipant(options ParticipantComplianceOptions) (*vcTypes.VerifiableCredential, *vcTypes.VerifiablePresentation, error)
- func (c *Compliance2210) GetTermsAndConditions(url RegistryUrl) (string, error)
- func (c *Compliance2210) ReSelfSign(credential *vcTypes.VerifiableCredential) error
- func (c *Compliance2210) SelfSign(vc *vcTypes.VerifiableCredential) error
- func (c *Compliance2210) SelfSignCredentialSubject(id string, credentialSubject []map[string]interface{}) (*vcTypes.VerifiableCredential, error)
- func (c *Compliance2210) SelfSignSignTermsAndConditions(id string) (*vcTypes.VerifiableCredential, error)
- func (c *Compliance2210) SelfSignVC(vc *vcTypes.VerifiableCredential) (*vcTypes.VerifiableCredential, error)
- func (c *Compliance2210) SelfVerify(vc *vcTypes.VerifiableCredential) error
- func (c *Compliance2210) SignLegalRegistrationNumber(options LegalRegistrationNumberOptions) (*vcTypes.VerifiableCredential, error)
- func (c *Compliance2210) SignServiceOffering(options ServiceOfferingComplianceOptions) (*vcTypes.VerifiableCredential, *vcTypes.VerifiablePresentation, error)
- func (c *Compliance2210) SignTermsAndConditions(id string) (*vcTypes.VerifiableCredential, error)
- type LegalRegistrationNumberOptions
- type ParticipantComplianceOptions
- type ParticipantOptions
- type ParticipantOptionsAsMap
- type RegistrationNumberType
- type RegistrationNumberUrl
- type RegistryUrl
- type ServiceOfferingComplianceOptions
- type ServiceOfferingOptions
- type ServiceOfferingOptionsAsMap
- type ServiceUrl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateRegistrationNumberType ¶
func ValidateRegistrationNumberType(fl validator.FieldLevel) bool
Types ¶
type Compliance ¶
type Compliance interface { SelfSign(credential *vcTypes.VerifiableCredential) error ReSelfSign(credential *vcTypes.VerifiableCredential) error SelfVerify(vc *vcTypes.VerifiableCredential) error SignLegalRegistrationNumber(options LegalRegistrationNumberOptions) (*vcTypes.VerifiableCredential, error) SignTermsAndConditions(id string) (*vcTypes.VerifiableCredential, error) GaiaXSignParticipant(options ParticipantComplianceOptions) (*vcTypes.VerifiableCredential, *vcTypes.VerifiablePresentation, error) SelfSignSignTermsAndConditions(id string) (*vcTypes.VerifiableCredential, error) SelfSignCredentialSubject(id string, credentialSubject []map[string]interface{}) (*vcTypes.VerifiableCredential, error) SignServiceOffering(options ServiceOfferingComplianceOptions) (*vcTypes.VerifiableCredential, *vcTypes.VerifiablePresentation, error) GetTermsAndConditions(url RegistryUrl) (string, error) }
func NewCompliance ¶
func NewCompliance(_ string, signUrl ServiceUrl, version string, key jwk.Key, issuer string, verificationMethod string) (Compliance, error)
NewCompliance Deprecated: should not be used anymore since normalization is now done in go directly and NewComplianceConnector implements more checks
func NewComplianceConnector ¶
func NewComplianceConnector(signUrl ServiceUrl, registrationNumberUrl RegistrationNumberUrl, version string, key jwk.Key, issuer string, verificationMethod string) (Compliance, error)
type Compliance2210 ¶
type Compliance2210 struct {
// contains filtered or unexported fields
}
func (*Compliance2210) GaiaXSignParticipant ¶
func (c *Compliance2210) GaiaXSignParticipant(options ParticipantComplianceOptions) (*vcTypes.VerifiableCredential, *vcTypes.VerifiablePresentation, error)
func (*Compliance2210) GetTermsAndConditions ¶
func (c *Compliance2210) GetTermsAndConditions(url RegistryUrl) (string, error)
func (*Compliance2210) ReSelfSign ¶
func (c *Compliance2210) ReSelfSign(credential *vcTypes.VerifiableCredential) error
func (*Compliance2210) SelfSign ¶
func (c *Compliance2210) SelfSign(vc *vcTypes.VerifiableCredential) error
SelfSign adds a crypto proof to the self-description
func (*Compliance2210) SelfSignCredentialSubject ¶
func (c *Compliance2210) SelfSignCredentialSubject(id string, credentialSubject []map[string]interface{}) (*vcTypes.VerifiableCredential, error)
func (*Compliance2210) SelfSignSignTermsAndConditions ¶
func (c *Compliance2210) SelfSignSignTermsAndConditions(id string) (*vcTypes.VerifiableCredential, error)
func (*Compliance2210) SelfSignVC ¶
func (c *Compliance2210) SelfSignVC(vc *vcTypes.VerifiableCredential) (*vcTypes.VerifiableCredential, error)
func (*Compliance2210) SelfVerify ¶
func (c *Compliance2210) SelfVerify(vc *vcTypes.VerifiableCredential) error
func (*Compliance2210) SignLegalRegistrationNumber ¶
func (c *Compliance2210) SignLegalRegistrationNumber(options LegalRegistrationNumberOptions) (*vcTypes.VerifiableCredential, error)
func (*Compliance2210) SignServiceOffering ¶
func (c *Compliance2210) SignServiceOffering(options ServiceOfferingComplianceOptions) (*vcTypes.VerifiableCredential, *vcTypes.VerifiablePresentation, error)
func (*Compliance2210) SignTermsAndConditions ¶
func (c *Compliance2210) SignTermsAndConditions(id string) (*vcTypes.VerifiableCredential, error)
type LegalRegistrationNumberOptions ¶
type LegalRegistrationNumberOptions struct { Id string `json:"id" validate:"required,uri"` RegistrationNumber string `json:"registrationNumber" validate:"required,alphanumunicode"` //todo add Gaia-X json ontology Type RegistrationNumberType `json:"type" validate:"required,validateRegistrationNumberType"` }
type ParticipantComplianceOptions ¶
type ParticipantComplianceOptions struct { Id string `json:"id" validate:"required,uri"` // Id will be the future id of the verifiable credential TermAndConditionsVC *vcTypes.VerifiableCredential `validate:"required"` // TermAndConditionsVC the pointer to the T&C vc LegalRegistrationNumberVC *vcTypes.VerifiableCredential `validate:"required"` // LegalRegistrationNumberVC pointer to the legal registration number vc Participant ParticipantOptions `validate:"required"` // Participant includes the interface to ParticipantOptions, these require that a vc can be built from it // contains filtered or unexported fields }
func (*ParticipantComplianceOptions) BuildParticipantVC ¶
func (pco *ParticipantComplianceOptions) BuildParticipantVC() error
type ParticipantOptions ¶
type ParticipantOptions interface {
BuildParticipantVC(id string) (*vcTypes.VerifiableCredential, error)
}
type ParticipantOptionsAsMap ¶
type ParticipantOptionsAsMap struct {
ParticipantCredentialSubject []map[string]interface{}
}
func (ParticipantOptionsAsMap) BuildParticipantVC ¶
func (pm ParticipantOptionsAsMap) BuildParticipantVC(id string) (*vcTypes.VerifiableCredential, error)
type RegistrationNumberType ¶
type RegistrationNumberType string
RegistrationNumberType implements the valid typed form https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#gx:legalRegistrationNumber
const ( VatID RegistrationNumberType = "gx:vatID" LeiCode RegistrationNumberType = "gx:leiCode" EUID RegistrationNumberType = "gx:EUID" TaxID RegistrationNumberType = "gx:taxID" EORI RegistrationNumberType = "gx:EORI" )
type RegistrationNumberUrl ¶
type RegistrationNumberUrl string
const ( ArubaV1Notary RegistrationNumberUrl = "https://gx-notary.aruba.it/v1/registrationNumberVC" TSystemV1Notary RegistrationNumberUrl = "https://gx-notary.gxdch.dih.telekom.com/v1/registrationNumberVC" LabV1Notary RegistrationNumberUrl = "https://registrationnumber.notary.lab.gaia-x.eu/v1/registrationNumberVC" AireV1Notary RegistrationNumberUrl = "https://gx-registry.airenetworks.es/v1/registrationNumberVC" )
func (RegistrationNumberUrl) String ¶
func (rn RegistrationNumberUrl) String() string
type RegistryUrl ¶
type RegistryUrl string
const ( AireRegistryV1 RegistryUrl = "https://gx-registry.airenetworks.es/v1/" ArubaRegistryV1 RegistryUrl = "https://gx-registry.aruba.it/v1/" TSystemsRegistryV1 RegistryUrl = "https://gx-registry.gxdch.dih.telekom.com/v1/" RegistryV1 RegistryUrl = "https://registry.lab.gaia-x.eu/v1/docs" )
func (RegistryUrl) String ¶
func (r RegistryUrl) String() string
type ServiceOfferingComplianceOptions ¶
type ServiceOfferingComplianceOptions struct { Id string ParticipantComplianceOptions ParticipantComplianceOptions ServiceOfferingOptions ServiceOfferingOptions // contains filtered or unexported fields }
func (*ServiceOfferingComplianceOptions) BuildVC ¶
func (sco *ServiceOfferingComplianceOptions) BuildVC() error
type ServiceOfferingOptions ¶
type ServiceOfferingOptions interface {
BuildServiceOfferingVC(id string) (*vcTypes.VerifiableCredential, error)
}
type ServiceOfferingOptionsAsMap ¶
type ServiceOfferingOptionsAsMap struct { CustomContext []string ServiceOfferingCredentialSubject []map[string]interface{} }
func (ServiceOfferingOptionsAsMap) BuildServiceOfferingVC ¶
func (sm ServiceOfferingOptionsAsMap) BuildServiceOfferingVC(id string) (*vcTypes.VerifiableCredential, error)
type ServiceUrl ¶
type ServiceUrl string
const ( MainBranch ServiceUrl = "https://compliance.lab.gaia-x.eu/main/api/credential-offers" DevelopmentBranch ServiceUrl = "https://compliance.lab.gaia-x.eu/development/api/credential-offers" V1Branch ServiceUrl = "https://compliance.lab.gaia-x.eu/v1/api/credential-offers" V1Staging ServiceUrl = "https://compliance.lab.gaia-x.eu/v1-staging/api/credential-offers" AireV1 ServiceUrl = "https://gx-compliance.airenetworks.es/v1/api/credential-offers" ArubaV1 ServiceUrl = "https://gx-compliance.aruba.it/v1/api/credential-offers" TSystemsV1 ServiceUrl = "https://gx-compliance.gxdch.dih.telekom.com/v1/api/credential-offers" )
func (ServiceUrl) String ¶
func (su ServiceUrl) String() string
Click to show internal directories.
Click to hide internal directories.