Documentation ¶
Index ¶
- Constants
- func AllRegistrars(node bcgo.Node, callback RegistrarCallback) error
- func AllRegistrarsForNode(node bcgo.Node, ...) error
- func AllRegistrationsForNode(node bcgo.Node, callback financego.RegistrationCallback) error
- func AllSubscriptionsForNode(node bcgo.Node, callback financego.SubscriptionCallback) error
- func ApplyDelta(delta *Delta, input []byte) []byte
- func CreateDeltas(reader io.Reader, max uint64, callback func(*Delta) error) error
- func DeltaChannelName(metaId string) string
- func IterateDeltas(node bcgo.Node, deltas bcgo.Channel, callback DeltaCallback) error
- func MetaChannelName(alias string) string
- func MimeTypes() []string
- func MinimumRegistrars() int
- func NewCloser(writer io.Writer, closer func() error) io.WriteCloser
- func OpenChargeChannel() bcgo.Channel
- func OpenDeltaChannel(metaId string) bcgo.Channel
- func OpenInvoiceChannel() bcgo.Channel
- func OpenMetaChannel(alias string) bcgo.Channel
- func OpenPreviewChannel(metaId string) bcgo.Channel
- func OpenRegistrarChannel() bcgo.Channel
- func OpenRegistrationChannel() bcgo.Channel
- func OpenSubscriptionChannel() bcgo.Channel
- func OpenTagChannel(metaId string) bcgo.Channel
- func OpenUsageRecordChannel() bcgo.Channel
- func OpenValidationChannel(alias string) bcgo.Channel
- func PreviewChannelName(metaId string) string
- func ReadDelta(deltas bcgo.Channel, cache bcgo.Cache, network bcgo.Network, ...) error
- func ReadMeta(metas bcgo.Channel, cache bcgo.Cache, network bcgo.Network, ...) error
- func ReadPreview(previews bcgo.Channel, cache bcgo.Cache, network bcgo.Network, ...) error
- func ReadTag(tags bcgo.Channel, cache bcgo.Cache, network bcgo.Network, ...) error
- func SpaceHosts() []string
- func TagChannelName(metaId string) string
- func Threshold(channel string) uint64
- func ValidationChannelName(alias string) string
- func Validator(node bcgo.Node, channel bcgo.Channel, listener bcgo.MiningListener) validation.Periodic
- type Closer
- type Delta
- func (*Delta) Descriptor() ([]byte, []int)
- func (m *Delta) GetDelete() uint64
- func (m *Delta) GetInsert() []byte
- func (m *Delta) GetOffset() uint64
- func (*Delta) ProtoMessage()
- func (m *Delta) Reset()
- func (m *Delta) String() string
- func (m *Delta) XXX_DiscardUnknown()
- func (m *Delta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Delta) XXX_Merge(src proto.Message)
- func (m *Delta) XXX_Size() int
- func (m *Delta) XXX_Unmarshal(b []byte) error
- type DeltaCallback
- type Meta
- func (*Meta) Descriptor() ([]byte, []int)
- func (m *Meta) GetName() string
- func (m *Meta) GetType() string
- func (*Meta) ProtoMessage()
- func (m *Meta) Reset()
- func (m *Meta) String() string
- func (m *Meta) XXX_DiscardUnknown()
- func (m *Meta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Meta) XXX_Merge(src proto.Message)
- func (m *Meta) XXX_Size() int
- func (m *Meta) XXX_Unmarshal(b []byte) error
- type MetaCallback
- type MetaFilter
- type Preview
- func (*Preview) Descriptor() ([]byte, []int)
- func (m *Preview) GetData() []byte
- func (m *Preview) GetHeight() uint32
- func (m *Preview) GetType() string
- func (m *Preview) GetWidth() uint32
- func (*Preview) ProtoMessage()
- func (m *Preview) Reset()
- func (m *Preview) String() string
- func (m *Preview) XXX_DiscardUnknown()
- func (m *Preview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Preview) XXX_Merge(src proto.Message)
- func (m *Preview) XXX_Size() int
- func (m *Preview) XXX_Unmarshal(b []byte) error
- type PreviewCallback
- type Registrar
- func (*Registrar) Descriptor() ([]byte, []int)
- func (m *Registrar) GetMerchant() *financego.Merchant
- func (m *Registrar) GetService() *financego.Service
- func (*Registrar) ProtoMessage()
- func (m *Registrar) Reset()
- func (m *Registrar) String() string
- func (m *Registrar) XXX_DiscardUnknown()
- func (m *Registrar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Registrar) XXX_Merge(src proto.Message)
- func (m *Registrar) XXX_Size() int
- func (m *Registrar) XXX_Unmarshal(b []byte) error
- type RegistrarCallback
- type Tag
- func (*Tag) Descriptor() ([]byte, []int)
- func (m *Tag) GetReason() string
- func (m *Tag) GetValue() string
- func (*Tag) ProtoMessage()
- func (m *Tag) Reset()
- func (m *Tag) String() string
- func (m *Tag) XXX_DiscardUnknown()
- func (m *Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Tag) XXX_Merge(src proto.Message)
- func (m *Tag) XXX_Size() int
- func (m *Tag) XXX_Unmarshal(b []byte) error
- type TagCallback
- type TagFilter
Constants ¶
View Source
const ( SPACE = "S P A C E" SPACE_CHARGE = "Space-Charge" SPACE_INVOICE = "Space-Invoice" SPACE_REGISTRAR = "Space-Registrar" SPACE_REGISTRATION = "Space-Registration" SPACE_SUBSCRIPTION = "Space-Subscription" SPACE_USAGE_RECORD = "Space-Usage-Record" SPACE_PREFIX = "Space-" SPACE_PREFIX_DELTA = "Space-Delta-" SPACE_PREFIX_META = "Space-Meta-" SPACE_PREFIX_PREVIEW = "Space-Preview-" SPACE_PREFIX_TAG = "Space-Tag-" SPACE_PREFIX_VALIDATION = "Space-Validation-" THRESHOLD_ACCOUNTING = bcgo.THRESHOLD_G // Charge, Invoice, Registrar, Registration, Subscription, Usage Record Channels THRESHOLD_CUSTOMER = bcgo.THRESHOLD_Z // Delta, Meta, Preview, Tag Channels THRESHOLD_VALIDATION = validation.THRESHOLD_PERIOD_DAY PERIOD_VALIDATION = validation.PERIOD_DAILY MIME_TYPE_UNKNOWN = "?/?" MIME_TYPE_IMAGE_JPEG = "image/jpeg" MIME_TYPE_IMAGE_JPG = "image/jpg" MIME_TYPE_IMAGE_GIF = "image/gif" MIME_TYPE_IMAGE_PNG = "image/png" MIME_TYPE_IMAGE_WEBP = "image/webp" MIME_TYPE_TEXT_PLAIN = "text/plain" MIME_TYPE_PDF = "application/pdf" MIME_TYPE_PROTOBUF = "application/x-protobuf" MIME_TYPE_VIDEO_MPEG = "video/mpeg" MIME_TYPE_AUDIO_MPEG = "audio/mpeg" MIME_TYPE_IMAGE_DEFAULT = "image/jpeg" MIME_TYPE_VIDEO_DEFAULT = "video/mpeg" MIME_TYPE_AUDIO_DEFAULT = "audio/mpeg" PREVIEW_IMAGE_SIZE = 128 PREVIEW_TEXT_LENGTH = 64 MAX_SIZE_BYTES = bcgo.MAX_PAYLOAD_SIZE_BYTES - 1024 // 10Mb-1Kb (for delta protobuf stuff) )
Variables ¶
This section is empty.
Functions ¶
func AllRegistrars ¶ added in v1.2.0
func AllRegistrars(node bcgo.Node, callback RegistrarCallback) error
AllRegistrars triggers the given callback for each registrar.
func AllRegistrarsForNode ¶ added in v1.2.0
func AllRegistrarsForNode(node bcgo.Node, callback func(*Registrar, *financego.Registration, *financego.Subscription) error) error
AllRegistrarsForNode triggers the given callback for each registrar with which the given node is registered, and optionally subscribed
func AllRegistrationsForNode ¶ added in v1.2.0
func AllRegistrationsForNode(node bcgo.Node, callback financego.RegistrationCallback) error
AllRegistrationsForNode triggers the given callback for each registration.
func AllSubscriptionsForNode ¶ added in v1.2.0
func AllSubscriptionsForNode(node bcgo.Node, callback financego.SubscriptionCallback) error
AllSubscriptionsForNode triggers the given callback for each subscription.
func ApplyDelta ¶
func CreateDeltas ¶
func DeltaChannelName ¶ added in v1.2.0
func IterateDeltas ¶
func MetaChannelName ¶ added in v1.2.0
func MinimumRegistrars ¶ added in v1.2.0
func MinimumRegistrars() int
func NewCloser ¶ added in v1.2.3
func NewCloser(writer io.Writer, closer func() error) io.WriteCloser
func OpenChargeChannel ¶
func OpenDeltaChannel ¶
func OpenInvoiceChannel ¶
func OpenMetaChannel ¶
func OpenPreviewChannel ¶
func OpenRegistrarChannel ¶
func OpenRegistrationChannel ¶
func OpenSubscriptionChannel ¶
func OpenTagChannel ¶
func OpenUsageRecordChannel ¶
func OpenValidationChannel ¶ added in v1.1.7
func PreviewChannelName ¶ added in v1.2.0
func ReadPreview ¶ added in v1.2.0
func SpaceHosts ¶ added in v1.2.0
func SpaceHosts() []string
func TagChannelName ¶ added in v1.2.0
func ValidationChannelName ¶ added in v1.2.0
func Validator ¶ added in v1.2.0
func Validator(node bcgo.Node, channel bcgo.Channel, listener bcgo.MiningListener) validation.Periodic
Types ¶
type Delta ¶
type Delta struct { // File Offset. Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` // Number of Bytes Deleted. Delete uint64 `protobuf:"varint,2,opt,name=delete,proto3" json:"delete,omitempty"` // Bytes Inserted. Insert []byte `protobuf:"bytes,3,opt,name=insert,proto3" json:"insert,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func Difference ¶ added in v1.2.3
Difference returns a sequence of deltas that transform the first of the given byte arrays into the second.
func (*Delta) Descriptor ¶
func (*Delta) ProtoMessage ¶
func (*Delta) ProtoMessage()
func (*Delta) XXX_DiscardUnknown ¶
func (m *Delta) XXX_DiscardUnknown()
func (*Delta) XXX_Marshal ¶
func (*Delta) XXX_Unmarshal ¶
type DeltaCallback ¶
type DeltaCallback func(*bcgo.BlockEntry, *Delta) error
type Meta ¶
type Meta struct { // Name of file. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // MIME type of file. Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Meta) Descriptor ¶
func (*Meta) ProtoMessage ¶
func (*Meta) ProtoMessage()
func (*Meta) XXX_DiscardUnknown ¶
func (m *Meta) XXX_DiscardUnknown()
func (*Meta) XXX_Unmarshal ¶
type MetaCallback ¶
type MetaCallback func(*bcgo.BlockEntry, *Meta) error
type MetaFilter ¶ added in v1.2.3
func NewNameFilter ¶ added in v1.2.3
func NewNameFilter(names ...string) MetaFilter
func NewTypeFilter ¶ added in v1.2.3
func NewTypeFilter(types ...string) MetaFilter
type Preview ¶
type Preview struct { // MIME type of preview Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Preview data Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // Preview width Width uint32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` // Preview height Height uint32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Preview) Descriptor ¶
func (*Preview) ProtoMessage ¶
func (*Preview) ProtoMessage()
func (*Preview) XXX_DiscardUnknown ¶
func (m *Preview) XXX_DiscardUnknown()
func (*Preview) XXX_Marshal ¶
func (*Preview) XXX_Unmarshal ¶
type PreviewCallback ¶
type PreviewCallback func(*bcgo.BlockEntry, *Preview) error
type Registrar ¶
type Registrar struct { Merchant *financego.Merchant `protobuf:"bytes,1,opt,name=merchant,proto3" json:"merchant,omitempty"` Service *financego.Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func RegistrarForAlias ¶ added in v1.2.0
func (*Registrar) Descriptor ¶
func (*Registrar) GetMerchant ¶
func (*Registrar) GetService ¶
func (*Registrar) ProtoMessage ¶
func (*Registrar) ProtoMessage()
func (*Registrar) XXX_DiscardUnknown ¶
func (m *Registrar) XXX_DiscardUnknown()
func (*Registrar) XXX_Marshal ¶
func (*Registrar) XXX_Unmarshal ¶
type RegistrarCallback ¶
type RegistrarCallback func(*bcgo.BlockEntry, *Registrar) error
type Tag ¶
type Tag struct { // The value of tag applied to meta Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // The reason for tagging Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Tag) Descriptor ¶
func (*Tag) ProtoMessage ¶
func (*Tag) ProtoMessage()
func (*Tag) XXX_DiscardUnknown ¶
func (m *Tag) XXX_DiscardUnknown()
func (*Tag) XXX_Unmarshal ¶
type TagCallback ¶
type TagCallback func(*bcgo.BlockEntry, *Tag) error
Click to show internal directories.
Click to hide internal directories.