Documentation ¶
Index ¶
- Constants
- type Config
- type FailedRecordScrubber
- type Odoo16Client
- type Odoo16Storage
- func (s *Odoo16Storage) Create(ctx context.Context, be *billingv1.BillingEntity) error
- func (s *Odoo16Storage) Get(ctx context.Context, name string) (*billingv1.BillingEntity, error)
- func (s *Odoo16Storage) List(ctx context.Context) ([]billingv1.BillingEntity, error)
- func (s *Odoo16Storage) Update(ctx context.Context, be *billingv1.BillingEntity) error
- type OdooCredentials
Constants ¶
View Source
const VSHNAccountingContactNameKey = "billing.appuio.io/vshn-accounting-contact-name"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FailedRecordScrubber ¶
type FailedRecordScrubber struct {
// contains filtered or unexported fields
}
func NewFailedRecordScrubber ¶
func NewFailedRecordScrubber(credentials OdooCredentials) *FailedRecordScrubber
func (*FailedRecordScrubber) CleanupIncompleteRecords ¶
func (s *FailedRecordScrubber) CleanupIncompleteRecords(ctx context.Context, minAge time.Duration) error
CleanupIncompleteRecords looks for partner records in Odoo that still have the "inflight" flag set despite being older than `minAge`. Those records are then deleted. Such records might come into existence due to a partially failed creation request.
type Odoo16Client ¶
type Odoo16Client interface { Read(string, []int64, *odooclient.Options, interface{}) error Update(string, []int64, interface{}) error FindResPartners(*odooclient.Criteria, *odooclient.Options) (*odooclient.ResPartners, error) CreateResPartner(*odooclient.ResPartner) (int64, error) UpdateResPartner(*odooclient.ResPartner) error DeleteResPartners([]int64) error }
type Odoo16Storage ¶
type Odoo16Storage struct {
// contains filtered or unexported fields
}
func NewOdoo16Storage ¶
func NewOdoo16Storage(credentials OdooCredentials, conf Config) *Odoo16Storage
func (*Odoo16Storage) Create ¶
func (s *Odoo16Storage) Create(ctx context.Context, be *billingv1.BillingEntity) error
func (*Odoo16Storage) Get ¶
func (s *Odoo16Storage) Get(ctx context.Context, name string) (*billingv1.BillingEntity, error)
func (*Odoo16Storage) List ¶
func (s *Odoo16Storage) List(ctx context.Context) ([]billingv1.BillingEntity, error)
func (*Odoo16Storage) Update ¶
func (s *Odoo16Storage) Update(ctx context.Context, be *billingv1.BillingEntity) error
type OdooCredentials ¶
type OdooCredentials = odooclient.ClientConfig
Click to show internal directories.
Click to hide internal directories.