Documentation
¶
Index ¶
- type AccessPolicy
- type Contact
- type ContactDefinition
- type Location
- type Proposal
- type Provider
- type Quality
- type Repository
- func (r *Repository) CountProposals() int
- func (r *Repository) CountProviders() int
- func (r *Repository) Countries() []string
- func (r *Repository) Exists(key string) bool
- func (r *Repository) Get(key string) *Proposal
- func (r *Repository) Match(filter *Proposal, max int) []*Proposal
- func (r *Repository) Proposals() []*Proposal
- func (r *Repository) Providers() []*Provider
- func (r *Repository) Remove(key string)
- func (r *Repository) RemoveExpired() int
- func (r *Repository) Renew(id string)
- func (r *Repository) RenewOrStore(p *Proposal)
- func (r *Repository) Store(p *Proposal)
- func (r *Repository) UpdateQuality(qualityData map[string]*Quality)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessPolicy ¶
type Contact ¶
type Contact struct {
Type string `json:"type"`
Definition ContactDefinition `json:"definition"`
}
type ContactDefinition ¶
type ContactDefinition struct {
BrokerAddresses []string `json:"broker_addresses"`
}
type Proposal ¶
type Proposal struct {
Format string `json:"format"`
Compatibility int `json:"compatibility"`
ProviderID string `json:"provider_id"`
ServiceType string `json:"service_type"`
Location Location `json:"location"`
Contacts []Contact `json:"contacts"`
Quality *Quality `json:"quality"`
AccessPolicies []AccessPolicy `json:"access_policies,omitempty"`
}
func (Proposal) ServiceKey ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewProposalRepository ¶
func NewProposalRepository(proposalLifetime time.Duration) *Repository
func (*Repository) CountProposals ¶
func (r *Repository) CountProposals() int
func (*Repository) CountProviders ¶
func (r *Repository) CountProviders() int
func (*Repository) Countries ¶ added in v0.3.0
func (r *Repository) Countries() []string
func (*Repository) Exists ¶
func (r *Repository) Exists(key string) bool
func (*Repository) Get ¶
func (r *Repository) Get(key string) *Proposal
func (*Repository) Match ¶ added in v0.4.0
func (r *Repository) Match(filter *Proposal, max int) []*Proposal
func (*Repository) Proposals ¶
func (r *Repository) Proposals() []*Proposal
func (*Repository) Providers ¶
func (r *Repository) Providers() []*Provider
func (*Repository) Remove ¶
func (r *Repository) Remove(key string)
func (*Repository) RemoveExpired ¶
func (r *Repository) RemoveExpired() int
func (*Repository) Renew ¶ added in v0.3.0
func (r *Repository) Renew(id string)
func (*Repository) RenewOrStore ¶ added in v0.3.0
func (r *Repository) RenewOrStore(p *Proposal)
func (*Repository) Store ¶
func (r *Repository) Store(p *Proposal)
func (*Repository) UpdateQuality ¶ added in v0.3.0
func (r *Repository) UpdateQuality(qualityData map[string]*Quality)
Click to show internal directories.
Click to hide internal directories.