Documentation ¶
Index ¶
- Variables
- func GetAllArtifacts(dbtx *sqlx.Tx) ([]interface{}, error)
- func GetAllPublishers(dbtx *sqlx.Tx) ([]interface{}, error)
- func GetById(dbh *sqlx.DB, artId string) (interface{}, error)
- func GetByPublisher(dbtx *sqlx.Tx, publisher string) ([]interface{}, error)
- func GetByType(dbtx *sqlx.Tx, t string, st string, page uint64, results uint64, pub string) (interface{}, error)
- func SetupTables(dbtx *sqlx.Tx) error
- type ArtifactFiles
- type ArtifactInfo
- type ArtifactPayment
- type ArtifactStorage
- type AutominerInfo
- type AutominerPoolInfo
- type Deactivate
- type DeactivateArtifact
- type DeactivatePub
- type DecimalDegrees
- type DegreesMinutesSeconds
- type Edit
- type EditArtifact
- type EditAutominer
- type EditAutominerPool
- type EditInfluencer
- type EditPlatform
- type EditPub
- type Geometry
- type IOip042
- type Oip042
- type OipAction
- type OipContext
- type PartyDetails
- type PaymentAddress
- type PaymentTokens
- type PlatformInfo
- type Publish
- type PublishArtifact
- type PublishPropertyParty
- type PublishPropertySpatialUnit
- type PublishPropertyTenure
- type PublishTomogram
- type PublisherInfo
- type PublisherVerification
- type Register
- type RegisterAutominer
- type RegisterAutominerPool
- type RegisterInfluencer
- type RegisterPlatform
- type RegisterPub
- type SpatialUnitDetails
- type TenureDetails
- type TomogramDetails
- type Transfer
- type TransferArtifact
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadSignature = errors.New("bad signature")
View Source
var ErrDescriptionMissing = errors.New("artifact missing description")
View Source
var ErrMissingOipAction = errors.New("missing oip action")
View Source
var ErrNotImplemented = errors.New("not implemented")
View Source
var ErrTypeMissing = errors.New("artifact missing type")
Functions ¶
func GetAllArtifacts ¶
func GetAllPublishers ¶
func SetupTables ¶
Types ¶
type ArtifactFiles ¶
type ArtifactFiles struct { Software string `json:"software,omitempty"` DisallowBuy bool `json:"disBuy,omitempty"` Dname string `json:"dname,omitempty"` Duration float64 `json:"duration,omitempty"` Fname string `json:"fname,omitempty"` Fsize int64 `json:"fsize,omitempty"` MinPlay float64 `json:"minPlay,omitempty"` SugPlay float64 `json:"sugPlay,omitempty"` Promo float64 `json:"promo,omitempty"` Retail float64 `json:"retail,omitempty"` PtpFT int `json:"ptpFT,omitempty"` PtpDT int `json:"ptpDT,omitempty"` PtpDA int `json:"ptpDA,omitempty"` Type string `json:"type,omitempty"` TokenlyID string `json:"tokenlyID,omitempty"` DisallowPlay bool `json:"disPlay,omitempty"` MinBuy float64 `json:"minBuy,omitempty"` SugBuy float64 `json:"sugBuy,omitempty"` SubType string `json:"subtype,omitempty"` CType string `json:"cType,omitempty"` FNotes string `json:"fNotes,omitempty"` }
type ArtifactInfo ¶
type ArtifactPayment ¶
type ArtifactPayment struct { Fiat string `json:"fiat,omitempty"` Scale string `json:"scale,omitempty"` SugTip []int `json:"sugTip,omitempty"` Tokens *PaymentTokens `json:"tokens,omitempty"` Addresses *PaymentAddress `json:"addresses,omitempty"` Platform int `json:"platform,omitempty"` Influencer int `json:"influencer,omitempty"` MaxDiscount float64 `json:"maxdisc,omitempty"` ShortMW []string `json:"shortMW,omitempty"` }
type ArtifactStorage ¶
type ArtifactStorage struct { Network string `json:"network,omitempty"` Location string `json:"location,omitempty"` Files []ArtifactFiles `json:"files,omitempty"` }
type AutominerInfo ¶
type AutominerInfo struct { HttpUrl string `json:"httpURL"` }
type AutominerPoolInfo ¶
type Deactivate ¶
type Deactivate struct { Artifact *DeactivateArtifact `json:"artifact,omitempty"` Pub *DeactivatePub `json:"pub,omitempty"` }
func (Deactivate) Validate ¶
func (d Deactivate) Validate(ctx OipContext) (OipAction, error)
type DeactivateArtifact ¶
type DeactivateArtifact struct { ArtifactID string `json:"artifactID"` Timestamp int64 `json:"timestamp"` Signature string `json:"signature"` }
func (DeactivateArtifact) Store ¶
func (da DeactivateArtifact) Store(context OipContext) error
func (DeactivateArtifact) Validate ¶
func (da DeactivateArtifact) Validate(context OipContext) (OipAction, error)
type DeactivatePub ¶
type DeactivatePub struct { FloAddress string `json:"address"` Timestamp int64 `json:"timestamp"` Signature string `json:"signature"` }
func (DeactivatePub) Store ¶
func (dp DeactivatePub) Store(context OipContext) error
func (DeactivatePub) Validate ¶
func (dp DeactivatePub) Validate(context OipContext) (OipAction, error)
type DecimalDegrees ¶
type DecimalDegrees struct { }
type DegreesMinutesSeconds ¶
type DegreesMinutesSeconds struct { }
type Edit ¶
type Edit struct { Pub *EditPub `json:"pub,omitempty"` Platform *EditPlatform `json:"platform,omitempty"` Influencer *EditInfluencer `json:"influencer,omitempty"` Autominer *EditAutominer `json:"autominer,omitempty"` AutominerPool *EditAutominerPool `json:"autominerPool,omitempty"` Artifact *EditArtifact `json:"artifact,omitempty"` }
type EditArtifact ¶
type EditArtifact struct { ArtifactID string `json:"artifactID"` Timestamp int64 `json:"timestamp"` RawPatch json.RawMessage `json:"patch"` Patch jsonpatch.Patch Signature string `json:"signature"` }
func (EditArtifact) Store ¶
func (ea EditArtifact) Store(context OipContext) error
func (EditArtifact) Validate ¶
func (ea EditArtifact) Validate(context OipContext) (OipAction, error)
type EditAutominer ¶
type EditAutominer struct { ArtifactID string `json:"artifactID"` Timestamp int64 `json:"timestamp"` Patch json.RawMessage `json:"patch"` Signature string `json:"signature"` }
func (*EditAutominer) Store ¶
func (autominer *EditAutominer) Store(context OipContext) error
func (*EditAutominer) Validate ¶
func (autominer *EditAutominer) Validate(context OipContext) (OipAction, error)
type EditAutominerPool ¶
type EditAutominerPool struct { ArtifactID string `json:"artifactID"` Timestamp int64 `json:"timestamp"` Patch json.RawMessage `json:"patch"` Signature string `json:"signature"` }
func (*EditAutominerPool) Store ¶
func (autominerPool *EditAutominerPool) Store(context OipContext) error
func (*EditAutominerPool) Validate ¶
func (autominerPool *EditAutominerPool) Validate(context OipContext) (OipAction, error)
type EditInfluencer ¶
type EditInfluencer struct { ArtifactID string `json:"artifactID"` Timestamp int64 `json:"timestamp"` Patch json.RawMessage `json:"patch"` Signature string `json:"signature"` }
func (*EditInfluencer) Store ¶
func (ei *EditInfluencer) Store(context OipContext) error
func (*EditInfluencer) Validate ¶
func (ei *EditInfluencer) Validate(context OipContext) (OipAction, error)
type EditPlatform ¶
type EditPlatform struct { ArtifactID string `json:"artifactID"` Timestamp int64 `json:"timestamp"` Patch json.RawMessage `json:"patch"` }
func (*EditPlatform) Store ¶
func (platform *EditPlatform) Store(context OipContext) error
func (*EditPlatform) Validate ¶
func (platform *EditPlatform) Validate(context OipContext) (OipAction, error)
type EditPub ¶
type EditPub struct { Address string `json:"address"` Timestamp int64 `json:"timestamp"` Patch json.RawMessage `json:"patch"` Signature string `json:"signature"` }
func (EditPub) Store ¶
func (ep EditPub) Store(context OipContext) error
type Geometry ¶
type Geometry struct { Type string `json:"type"` Data json.RawMessage `json:"data"` // contains filtered or unexported fields }
type Oip042 ¶
type Oip042 struct { Register *Register `json:"register,omitempty"` Publish *Publish `json:"publish,omitempty"` Edit *Edit `json:"edit,omitempty"` Deactivate *Deactivate `json:"deactivate,omitempty"` Transfer *Transfer `json:"transfer,omitempty"` }
func (Oip042) ValidateIncoming ¶
type OipAction ¶
type OipAction interface { Validate(context OipContext) (OipAction, error) Store(context OipContext) error }
type OipContext ¶
type PartyDetails ¶
type PartyDetails struct { Ns string `json:"ns,omitempty"` PartyRole string `json:"partyRole,omitempty"` PartyType string `json:"partyType,omitempty"` Tenures []string `json:"tenures,omitempty"` Groups []string `json:"groups,omitempty"` Members []string `json:"members,omitempty"` Attrs json.RawMessage `json:"attrs,omitempty"` }
type PaymentAddress ¶
type PaymentTokens ¶
type PlatformInfo ¶
type PlatformInfo struct { HttpUrl string `json:"httpURL"` }
type Publish ¶
type Publish struct {
Artifact *PublishArtifact `json:"artifact,omitempty"`
}
type PublishArtifact ¶
type PublishArtifact struct { FloAddress string `json:"floAddress,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` Type string `json:"type,omitempty"` SubType string `json:"subtype,omitempty"` Info *ArtifactInfo `json:"info,omitempty"` Details json.RawMessage `json:"details,omitempty"` Storage *ArtifactStorage `json:"storage,omitempty"` Payment *ArtifactPayment `json:"payment,omitempty"` Signature string `json:"signature,omitempty"` }
func (PublishArtifact) Store ¶
func (pa PublishArtifact) Store(context OipContext) error
func (PublishArtifact) Validate ¶
func (pa PublishArtifact) Validate(context OipContext) (OipAction, error)
type PublishPropertyParty ¶
type PublishPropertyParty struct { PublishArtifact PartyDetails }
func (PublishPropertyParty) MarshalJSON ¶
func (ppp PublishPropertyParty) MarshalJSON() ([]byte, error)
func (PublishPropertyParty) Store ¶
func (ppp PublishPropertyParty) Store(context OipContext) error
func (PublishPropertyParty) Validate ¶
func (ppp PublishPropertyParty) Validate(context OipContext) (OipAction, error)
type PublishPropertySpatialUnit ¶
type PublishPropertySpatialUnit struct { PublishArtifact SpatialUnitDetails }
func (PublishPropertySpatialUnit) MarshalJSON ¶
func (ppsu PublishPropertySpatialUnit) MarshalJSON() ([]byte, error)
func (PublishPropertySpatialUnit) Store ¶
func (ppsu PublishPropertySpatialUnit) Store(context OipContext) error
func (PublishPropertySpatialUnit) Validate ¶
func (ppsu PublishPropertySpatialUnit) Validate(context OipContext) (OipAction, error)
type PublishPropertyTenure ¶
type PublishPropertyTenure struct { PublishArtifact TenureDetails }
func (PublishPropertyTenure) MarshalJSON ¶
func (ppt PublishPropertyTenure) MarshalJSON() ([]byte, error)
func (PublishPropertyTenure) Store ¶
func (ppt PublishPropertyTenure) Store(context OipContext) error
func (PublishPropertyTenure) Validate ¶
func (ppt PublishPropertyTenure) Validate(context OipContext) (OipAction, error)
type PublishTomogram ¶
type PublishTomogram struct { PublishArtifact TomogramDetails }
func (PublishTomogram) MarshalJSON ¶
func (pt PublishTomogram) MarshalJSON() ([]byte, error)
func (PublishTomogram) Store ¶
func (pt PublishTomogram) Store(context OipContext) error
func (PublishTomogram) Validate ¶
func (pt PublishTomogram) Validate(context OipContext) (OipAction, error)
type PublisherInfo ¶
type PublisherInfo struct { Emailmd5 string `json:"emailmd5,omitempty"` AvatarNetwork string `json:"avatarNetwork,omitempty"` Avatar string `json:"avatar,omitempty"` HeaderImageNetwork string `json:"headerImageNetwork,omitempty"` HeaderImage string `json:"headerImage,omitempty"` Bitmessage string `json:"bitmessage,omitempty"` }
type PublisherVerification ¶
type Register ¶
type Register struct { Pub *RegisterPub `json:"pub,omitempty"` Platform *RegisterPlatform `json:"platform,omitempty"` Influencer *RegisterInfluencer `json:"influencer,omitempty"` Autominer *RegisterAutominer `json:"autominer,omitempty"` AutominerPool *RegisterAutominerPool `json:"autominerPool,omitempty"` }
type RegisterAutominer ¶
type RegisterAutominer struct { Alias string `json:"alias"` Timestamp int64 `json:"timestamp"` FloAddress string `json:"floAddress"` Addresses []PaymentAddress `json:"addresses"` ShortMW []string `json:"shortMW"` Version int32 `json:"version"` Info AutominerInfo `json:"info"` Signature string `json:"signature"` }
func (RegisterAutominer) Store ¶
func (ram RegisterAutominer) Store(context OipContext) error
func (RegisterAutominer) Validate ¶
func (ram RegisterAutominer) Validate(context OipContext) (OipAction, error)
type RegisterAutominerPool ¶
type RegisterAutominerPool struct { Alias string `json:"alias"` Timestamp int64 `json:"timestamp"` FloAddress string `json:"floAddress"` Addresses []PaymentAddress `json:"addresses"` ShortMW []string `json:"shortMW"` Verification map[string]string `json:"verification"` Version int32 `json:"version"` Info AutominerInfo `json:"info"` Signature string `json:"signature"` }
func (RegisterAutominerPool) Store ¶
func (ramp RegisterAutominerPool) Store(context OipContext) error
func (RegisterAutominerPool) Validate ¶
func (ramp RegisterAutominerPool) Validate(context OipContext) (OipAction, error)
type RegisterInfluencer ¶
type RegisterInfluencer struct { Alias string `json:"alias"` Timestamp int64 `json:"timestamp"` FloAddress string `json:"floAddress"` Addresses []PaymentAddress `json:"addresses"` ShortMW []string `json:"shortMW"` Verification map[string]string `json:"verification"` Version int32 `json:"version"` Signature string `json:"signature"` }
func (*RegisterInfluencer) Store ¶
func (ri *RegisterInfluencer) Store(context OipContext) error
func (*RegisterInfluencer) Validate ¶
func (ri *RegisterInfluencer) Validate(context OipContext) (OipAction, error)
type RegisterPlatform ¶
type RegisterPlatform struct { Alias string `json:"alias"` Timestamp int64 `json:"timestamp"` FloAddress string `json:"floAddress"` Addresses []PaymentAddress `json:"addresses"` ShortMW []string `json:"shortMW"` Verification map[string]string `json:"verification"` Version int32 `json:"version"` Info PlatformInfo `json:"info"` }
func (RegisterPlatform) Store ¶
func (rp RegisterPlatform) Store(context OipContext) error
func (RegisterPlatform) Validate ¶
func (rp RegisterPlatform) Validate(context OipContext) (OipAction, error)
type RegisterPub ¶
type RegisterPub struct { Alias string `json:"alias,omitempty"` FloAddress string `json:"floAddress,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` Authorized []string `json:"authorized,omitempty"` Info *PublisherInfo `json:"info,omitempty"` Verification *PublisherVerification `json:"verification,omitempty"` Signature string `json:"signature,omitempty"` }
func (RegisterPub) Store ¶
func (rp RegisterPub) Store(context OipContext) error
func (RegisterPub) Validate ¶
func (rp RegisterPub) Validate(context OipContext) (OipAction, error)
type SpatialUnitDetails ¶
type SpatialUnitDetails struct { Ns string `json:"ns,omitempty"` Geometry *Geometry `json:"geometry,omitempty"` SpatialType string `json:"spatialType,omitempty"` SpatialUnits []string `json:"spatialUnits,omitempty"` BBox []float64 `json:"bbox,omitempty"` Attrs json.RawMessage `json:"attrs,omitempty"` }
type TenureDetails ¶
type TomogramDetails ¶
type TomogramDetails struct { Date int64 `json:"date,omitempty"` NCBItaxID int64 `json:"NCBItaxID,omitempty"` TypoNBCI int64 `json:"NBCItaxID,omitempty"` ArtNotes string `json:"artNotes,omitempty"` ScopeName string `json:"scopeName,omitempty"` Roles string `json:"roles,omitempty"` SpeciesName string `json:"speciesName,omitempty"` Strain string `json:"strain,omitempty"` TiltSingleDual int64 `json:"tiltSingleDual,omitempty"` Defocus float64 `json:"defocus,omitempty"` Dosage float64 `json:"dosage,omitempty"` TiltConstant float64 `json:"tiltConstant,omitempty"` TiltMin float64 `json:"tiltMin,omitempty"` TiltMax float64 `json:"tiltMax,omitempty"` TiltStep float64 `json:"tiltStep,omitempty"` Magnification float64 `json:"magnification,omitempty"` Emdb string `json:"emdb,omitempty"` Microscopist string `json:"microscopist,omitempty"` Institution string `json:"institution,omitempty"` Lab string `json:"lab,omitempty"` Sid string `json:"sid,omitempty"` }
type Transfer ¶
type Transfer struct {
Artifact *TransferArtifact `json:"artifact,omitempty"`
}
type TransferArtifact ¶
type TransferArtifact struct { ArtifactID string `json:"artifactID"` ToFloAddress string `json:"toFloAddress"` FromFloAddress string `json:"fromFloAddress"` Timestamp int64 `json:"timestamp"` Signature string `json:"signature"` }
func (TransferArtifact) Store ¶
func (ta TransferArtifact) Store(context OipContext) error
func (TransferArtifact) Validate ¶
func (ta TransferArtifact) Validate(context OipContext) (OipAction, error)
Click to show internal directories.
Click to hide internal directories.