Documentation ¶
Index ¶
- Constants
- type BaseItemParams
- type BillingParams
- type ELineItemParams
- type FindParams
- type GetParams
- type LoginParams
- type LoginResponse
- type Orchestra
- func (o *Orchestra) ExecInventoryFind(params *FindParams) error
- func (o *Orchestra) ExecInventoryGet(params *GetParams) error
- func (o *Orchestra) ExecOfferFind(params *FindParams) error
- func (o *Orchestra) ExecOfferGet(params *GetParams) error
- func (o *Orchestra) ExecOrderCreate(params *OrderParams) error
- func (o *Orchestra) ExecOrderFind(params *FindParams) error
- func (o *Orchestra) ExecOrderGet(params *GetParams) error
- func (o *Orchestra) ExecPOQCreate(params *OrderParams) error
- func (o *Orchestra) ExecPOQFind(params *FindParams) error
- func (o *Orchestra) ExecPOQGet(params *GetParams) error
- func (o *Orchestra) ExecQuoteCreate(params *OrderParams) error
- func (o *Orchestra) ExecQuoteFind(params *FindParams) error
- func (o *Orchestra) ExecQuoteGet(params *GetParams) error
- func (o *Orchestra) ExecSiteFind(params *FindParams) error
- func (o *Orchestra) ExecSiteGet(params *GetParams) error
- func (o *Orchestra) GetFakeMode() bool
- func (o *Orchestra) GetPartnerCfgByID(id string) *config.PartnerCfg
- func (o *Orchestra) GetPartnerCfgByName(name string) *config.PartnerCfg
- func (o *Orchestra) GetPartnerImpl(name string) *PartnerImpl
- func (o *Orchestra) Init() error
- func (o *Orchestra) SetApiToken(name string, token string)
- func (o *Orchestra) SetFakeMode(mode bool)
- type OrderParams
- type PartnerImpl
- func (p *PartnerImpl) ClearApiToken()
- func (p *PartnerImpl) ExecAuthLogin(params *LoginParams) error
- func (p *PartnerImpl) ExecInventoryFind(params *FindParams) error
- func (p *PartnerImpl) ExecInventoryGet(params *GetParams) error
- func (p *PartnerImpl) ExecOfferFind(params *FindParams) error
- func (p *PartnerImpl) ExecOfferGet(params *GetParams) error
- func (p *PartnerImpl) ExecOrderCreate(params *OrderParams) error
- func (p *PartnerImpl) ExecOrderFind(params *FindParams) error
- func (p *PartnerImpl) ExecOrderGet(params *GetParams) error
- func (p *PartnerImpl) ExecPOQCreate(params *OrderParams) error
- func (p *PartnerImpl) ExecPOQFind(params *FindParams) error
- func (p *PartnerImpl) ExecPOQGet(params *GetParams) error
- func (p *PartnerImpl) ExecQuoteCreate(params *OrderParams) error
- func (p *PartnerImpl) ExecQuoteFind(params *FindParams) error
- func (p *PartnerImpl) ExecQuoteGet(params *GetParams) error
- func (p *PartnerImpl) ExecSiteFind(params *FindParams) error
- func (p *PartnerImpl) ExecSiteGet(params *GetParams) error
- func (p *PartnerImpl) GetApiToken() string
- func (p *PartnerImpl) GetFakeMode() bool
- func (p *PartnerImpl) GetSonataUrl() string
- func (p *PartnerImpl) Init() error
- func (p *PartnerImpl) RenewApiToken() string
- func (p *PartnerImpl) SetApiToken(token string)
- func (p *PartnerImpl) TryUpdateApiToken()
- type PartnerParams
- type UNIItemParams
Constants ¶
View Source
const ( MEFAPIVersionSite = "3" MEFAPIVersionPOQ = "3" MEFAPIVersionQuote = "2" MEFAPIVersionOrder = "3" MEFAPIVersionInv = "3" MEFAPIVersionOffer = "1" MEFSchemaLocationRoot = "https://github.com/MEF-GIT/MEF-LSO-Sonata-SDK/blob/working-draft" MEFSchemaLocationSpecRoot = MEFSchemaLocationRoot + "/payload_descriptions/ProductSpecDescription" MEFSchemaLocationSpecUNI = MEFSchemaLocationSpecRoot + "/MEF_UNISpec_v3.json" MEFSchemaLocationSpecELine = MEFSchemaLocationSpecRoot + "/MEF_ELineSpec_v3.json" MEFProductOfferingUNI = "LSO_Sonata_DataOnDemand_EthernetPort_UNI" MEFProductOfferingELine = "LSO_Sonata_DataOnDemand_EthernetConnection" )
View Source
const ( BillingTypePAYG = "PAYG" BillingTypeDOD = "DOD" BillingTypeUsage = "USAGE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseItemParams ¶
type BaseItemParams struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` ItemID string `json:"itemID,omitempty"` Action string `json:"action,omitempty"` ProdSpecID string `json:"prodSpecID,omitempty"` ProdOfferID string `json:"prodOfferID,omitempty"` ProductID string `json:"productID,omitempty"` BuyerProductID string `json:"buyerProductID,omitempty"` QuoteID string `json:"quoteID,omitempty"` QuoteItemID string `json:"quoteItemID,omitempty"` BillingParams *BillingParams `json:"billingParams,omitempty"` }
type BillingParams ¶
type BillingParams struct { PaymentType string `json:"paymentType,omitempty"` BillingType string `json:"billingType,omitempty"` BillingUnit string `json:"billingUnit,omitempty"` // used for PAYG, etc day/month/year MeasureUnit string `json:"measureUnit,omitempty"` // used for USAGE, etc minute/hour/Mbps/MByte StartTime int64 `json:"startTime,omitempty"` // used for DOD Duration, unix seconds EndTime int64 `json:"endTime,omitempty"` // used for DOD Duration, unix seconds Currency string `json:"currency,omitempty"` // etc USA/HKD/CNY Price float32 `json:"price,omitempty"` }
type ELineItemParams ¶
type ELineItemParams struct { BaseItemParams SrcPortID string `json:"srcPortID,omitempty"` DstPortID string `json:"dstPortID,omitempty"` DstCompanyID string `json:"dstCompanyID,omitempty"` DstMetroID string `json:"dstMetroID,omitempty"` Bandwidth uint `json:"bandwidth,omitempty"` BwUnit string `json:"bwUnit,omitempty"` SVlanID uint `json:"sVlanID,omitempty"` CosName string `json:"cosName,omitempty"` SrcLocationID string `json:"srcLocationID,omitempty"` DstLocationID string `json:"dstLocationID,omitempty"` }
type FindParams ¶
type FindParams struct { Buyer *PartnerParams `json:"buyer,omitempty"` Seller *PartnerParams `json:"seller,omitempty"` Offset string `json:"offset,omitempty"` Limit string `json:"limit,omitempty"` ProjectID string `json:"projectID,omitempty"` ExternalID string `json:"externalID,omitempty"` BuyerID string `json:"buyerID,omitempty"` SiteID string `json:"siteID,omitempty"` State string `json:"state,omitempty"` ProductSpecificationID string `json:"productSpecificationID,omitempty"` ProductOfferingID string `json:"productOfferingID,omitempty"` ProductOrderID string `json:"productOrderID,omitempty"` XResultCount int32 `json:"-"` //The number of resources retrieved in the response XTotalCount int32 `json:"-"` //The total number of matching resources RspSiteList []*sitmod.GeographicSiteFindResp `json:"-"` RspPoqList []*poqmod.ProductOfferingQualificationFind `json:"-"` RspQuoteList []*quomod.QuoteFind `json:"-"` RspOrderList []*ordmod.ProductOrderSummary `json:"-"` RspInvList []*invmod.ProductSummary `json:"-"` RspOfferList []*offer.ProductOffering `json:"-"` }
type GetParams ¶
type GetParams struct { Buyer *PartnerParams `json:"buyer,omitempty"` Seller *PartnerParams `json:"seller,omitempty"` ID string `json:"id,omitempty"` RspSite *sitmod.GeographicSite `json:"-"` RspPoq *poqmod.ProductOfferingQualification `json:"-"` RspQuote *quomod.Quote `json:"-"` RspOrder *ordmod.ProductOrder `json:"-"` RspInv *invmod.Product `json:"-"` RspOffer *offer.ProductOffering `json:"-"` }
type LoginParams ¶
type LoginParams struct { Username string `json:"username"` Password string `json:"password"` RspLogin *LoginResponse }
type LoginResponse ¶
type LoginResponse struct {
Data string `json:"data"`
}
type Orchestra ¶
type Orchestra struct {
// contains filtered or unexported fields
}
func NewOrchestra ¶
func (*Orchestra) ExecInventoryFind ¶
func (o *Orchestra) ExecInventoryFind(params *FindParams) error
func (*Orchestra) ExecInventoryGet ¶
func (*Orchestra) ExecOfferFind ¶
func (o *Orchestra) ExecOfferFind(params *FindParams) error
func (*Orchestra) ExecOfferGet ¶
func (*Orchestra) ExecOrderCreate ¶
func (o *Orchestra) ExecOrderCreate(params *OrderParams) error
func (*Orchestra) ExecOrderFind ¶
func (o *Orchestra) ExecOrderFind(params *FindParams) error
func (*Orchestra) ExecOrderGet ¶
func (*Orchestra) ExecPOQCreate ¶
func (o *Orchestra) ExecPOQCreate(params *OrderParams) error
func (*Orchestra) ExecPOQFind ¶
func (o *Orchestra) ExecPOQFind(params *FindParams) error
func (*Orchestra) ExecPOQGet ¶
func (*Orchestra) ExecQuoteCreate ¶
func (o *Orchestra) ExecQuoteCreate(params *OrderParams) error
func (*Orchestra) ExecQuoteFind ¶
func (o *Orchestra) ExecQuoteFind(params *FindParams) error
func (*Orchestra) ExecQuoteGet ¶
func (*Orchestra) ExecSiteFind ¶
func (o *Orchestra) ExecSiteFind(params *FindParams) error
func (*Orchestra) ExecSiteGet ¶
func (*Orchestra) GetFakeMode ¶
func (*Orchestra) GetPartnerCfgByID ¶
func (o *Orchestra) GetPartnerCfgByID(id string) *config.PartnerCfg
func (*Orchestra) GetPartnerCfgByName ¶
func (o *Orchestra) GetPartnerCfgByName(name string) *config.PartnerCfg
func (*Orchestra) GetPartnerImpl ¶
func (o *Orchestra) GetPartnerImpl(name string) *PartnerImpl
func (*Orchestra) SetApiToken ¶
func (*Orchestra) SetFakeMode ¶
type OrderParams ¶
type OrderParams struct { Buyer *PartnerParams `json:"buyer,omitempty"` Seller *PartnerParams `json:"seller,omitempty"` OrderActivity string `json:"orderActivity,omitempty"` Description string `json:"description,omitempty"` ProjectID string `json:"projectID,omitempty"` ExternalID string `json:"externalID,omitempty"` UNIItems []*UNIItemParams `json:"uniItems,omitempty"` ELineItems []*ELineItemParams `json:"elineItems,omitempty"` BillingType string `json:"billingType,omitempty"` PaymentType string `json:"paymentType,omitempty"` RspPoq *poqmod.ProductOfferingQualification `json:"-"` RspQuote *quomod.Quote `json:"-"` RspOrder *ordmod.ProductOrder `json:"-"` }
type PartnerImpl ¶
type PartnerImpl struct { Orch *Orchestra // contains filtered or unexported fields }
func NewPartnerImpl ¶
func NewPartnerImpl(o *Orchestra, cfg *config.PartnerCfg) *PartnerImpl
func (*PartnerImpl) ClearApiToken ¶
func (p *PartnerImpl) ClearApiToken()
func (*PartnerImpl) ExecAuthLogin ¶
func (p *PartnerImpl) ExecAuthLogin(params *LoginParams) error
func (*PartnerImpl) ExecInventoryFind ¶
func (p *PartnerImpl) ExecInventoryFind(params *FindParams) error
func (*PartnerImpl) ExecInventoryGet ¶
func (p *PartnerImpl) ExecInventoryGet(params *GetParams) error
func (*PartnerImpl) ExecOfferFind ¶
func (p *PartnerImpl) ExecOfferFind(params *FindParams) error
func (*PartnerImpl) ExecOfferGet ¶
func (p *PartnerImpl) ExecOfferGet(params *GetParams) error
func (*PartnerImpl) ExecOrderCreate ¶
func (p *PartnerImpl) ExecOrderCreate(params *OrderParams) error
func (*PartnerImpl) ExecOrderFind ¶
func (p *PartnerImpl) ExecOrderFind(params *FindParams) error
func (*PartnerImpl) ExecOrderGet ¶
func (p *PartnerImpl) ExecOrderGet(params *GetParams) error
func (*PartnerImpl) ExecPOQCreate ¶
func (p *PartnerImpl) ExecPOQCreate(params *OrderParams) error
func (*PartnerImpl) ExecPOQFind ¶
func (p *PartnerImpl) ExecPOQFind(params *FindParams) error
func (*PartnerImpl) ExecPOQGet ¶
func (p *PartnerImpl) ExecPOQGet(params *GetParams) error
func (*PartnerImpl) ExecQuoteCreate ¶
func (p *PartnerImpl) ExecQuoteCreate(params *OrderParams) error
func (*PartnerImpl) ExecQuoteFind ¶
func (p *PartnerImpl) ExecQuoteFind(params *FindParams) error
func (*PartnerImpl) ExecQuoteGet ¶
func (p *PartnerImpl) ExecQuoteGet(params *GetParams) error
func (*PartnerImpl) ExecSiteFind ¶
func (p *PartnerImpl) ExecSiteFind(params *FindParams) error
func (*PartnerImpl) ExecSiteGet ¶
func (p *PartnerImpl) ExecSiteGet(params *GetParams) error
func (*PartnerImpl) GetApiToken ¶
func (p *PartnerImpl) GetApiToken() string
func (*PartnerImpl) GetFakeMode ¶
func (p *PartnerImpl) GetFakeMode() bool
func (*PartnerImpl) GetSonataUrl ¶
func (p *PartnerImpl) GetSonataUrl() string
func (*PartnerImpl) Init ¶
func (p *PartnerImpl) Init() error
func (*PartnerImpl) RenewApiToken ¶
func (p *PartnerImpl) RenewApiToken() string
func (*PartnerImpl) SetApiToken ¶
func (p *PartnerImpl) SetApiToken(token string)
func (*PartnerImpl) TryUpdateApiToken ¶
func (p *PartnerImpl) TryUpdateApiToken()
type PartnerParams ¶
type UNIItemParams ¶
type UNIItemParams struct { BaseItemParams SiteID string `json:"siteID,omitempty"` PortSpeed uint `json:"portSpeed,omitempty"` }
Click to show internal directories.
Click to hide internal directories.