Documentation ¶
Index ¶
- Constants
- func InitializeUsernameAndPassword(credentialFile string)
- type Device
- func (device Device) GetDeviceId() float64
- func (device Device) GetDeviceName() string
- func (device Device) GetDeviceType() string
- func (device Device) GetDeviceUserId() float64
- func (device Device) GetPhoneNumber() string
- func (device Device) GetTunnelable() bool
- func (device Device) GetWhenCreated() string
- type Devices
- type Error
- type Errors
- type Parameters
- type Placeholder
- type Plan
- func (plan Plan) GetDataPlanBillingPeriod() float64
- func (plan Plan) GetDataPlanCarrierId() float64
- func (plan Plan) GetDataPlanDescription() string
- func (plan Plan) GetDataPlanGroupId() float64
- func (plan Plan) GetDataPlanId() float64
- func (plan Plan) GetDataPlanName() string
- func (plan Plan) GetDataPlanPartnerId() float64
- func (plan Plan) GetDataPlanSize() float64
- func (plan Plan) GetDataPlanTemplateId() float64
- func (plan Plan) GetDataPlanTrialDays() float64
- func (plan Plan) IsDataPlanEnabled() bool
- func (plan Plan) IsDataPlanRecurring() bool
- type Plans
- type Product
- func (product Product) GetProductDescription() string
- func (product Product) GetProductId() float64
- func (product Product) GetProductImageUrl() string
- func (product Product) GetProductInvoiceDescription() string
- func (product Product) GetProductName() string
- func (product Product) GetProductPreorderDetails() string
- func (product Product) GetProductPrice() string
- func (product Product) GetProductSku() string
- type ProductCategories
- type ProductCategory
- type ProductOption
- func (productOption ProductOption) GetProductIdFromOption() float64
- func (productOption ProductOption) GetProductOptionAppendSku() string
- func (productOption ProductOption) GetProductOptionDescription() string
- func (productOption ProductOption) GetProductOptionInvoiceDescription() string
- func (productOption ProductOption) GetProductOptionPriceChange() string
- type ProductOptions
- type Products
- type Response
- type ResponseError
- type SMS
- type Session
- type User
- type Users
Constants ¶
const ( STATUS_OK = 200 STATUS_CREATED = 201 STATUS_ACCEPTED = 202 STATUS_NO_CONTENT = 204 STATUS_INVALID = 400 STATUS_UNAUTHORIZED = 401 STATUS_FORBIDDEN = 403 STATUS_NOTFOUND = 404 STATUS_LIMIT = 429 STATUS_GATEWAY = 502 )
HTTP status codes
const HOLOGRAM_REST_API_BASEURL = "https://dashboard.hologram.io/api/1"
Variables ¶
This section is empty.
Functions ¶
func InitializeUsernameAndPassword ¶
func InitializeUsernameAndPassword(credentialFile string)
REQUIRES: User's username and password. EFFECTS: Initializes the user's username and password state to be used in each
basic authenticated API call.
Types ¶
type Device ¶
type Device map[string]interface{}
Device object returned in the response.
func ClaimOwnershipAndActivateDevice ¶
ClaimOwnershipAndActivateDevice claims ownership and activate the given device.
func PurchaseAndAssignPhoneNumberToDevice ¶
PurchaseAndAssignPhoneNumberToDevice purchases and assigns a phone number to the device.
func (Device) GetDeviceName ¶
GetDeviceName returns the device name.
func (Device) GetDeviceType ¶
GetDeviceType returns the device type.
func (Device) GetDeviceUserId ¶
GetDeviceUserId returns the user id.
func (Device) GetPhoneNumber ¶
GetPhoneNumber returns a phone number.
func (Device) GetTunnelable ¶
GetTunnelable returns true if it is tunnelable.
func (Device) GetWhenCreated ¶
GetWhenCreated returns a UNIX timestamp of the creation time.
type Parameters ¶
type Parameters struct {
// contains filtered or unexported fields
}
type Placeholder ¶
type Placeholder map[string]interface{}
This is just a placeholder for the map[string]interface{}, which is used when unmarshalling data from a json object.
type Plan ¶
type Plan map[string]interface{}
Plan is basically the returned Plan type in the response.
func GetDeviceDataPlan ¶
GetDeviceDataPlan returns a given device data plan.
func (Plan) GetDataPlanBillingPeriod ¶
GetDataPlanBillingPeriod returns the billing period.
func (Plan) GetDataPlanCarrierId ¶
GetDataPlanCarrierId returns the carrier id of the data plan.
func (Plan) GetDataPlanDescription ¶
GetDataPlanDescription returns the data plan description.
func (Plan) GetDataPlanGroupId ¶
GetDataPlanGroupId returns the groupid of the data plan.
func (Plan) GetDataPlanId ¶
GetDataPlanId returns the data plan id.
func (Plan) GetDataPlanName ¶
GetDataPlanName returns the data plan name.
func (Plan) GetDataPlanPartnerId ¶
GetDataPlanPartnerId returns the data plan partner id.
func (Plan) GetDataPlanSize ¶
GetDataPlanSize returns the data size.
func (Plan) GetDataPlanTemplateId ¶
GetDataPlanTemplateId returns the data plan template id.
func (Plan) GetDataPlanTrialDays ¶
GetDataPlanTrialDays returns the number of trial days left.
func (Plan) IsDataPlanEnabled ¶
IsDataPlanEnabled returns true if the data plan is enabled.
func (Plan) IsDataPlanRecurring ¶
IsDataPlanRecurring returns true if it is recurring.
type Plans ¶
type Plans []interface{}
Plans is just a list of Plan(s).
func GetDeviceDataPlans ¶
func GetDeviceDataPlans() Plans
GetDeviceDataPlans returns device data plans.
type Product ¶
type Product map[string]interface{}
Product implements the Product type returned in the response.
func (Product) GetProductDescription ¶
GetProductDescription returns the description of the product.
func (Product) GetProductId ¶
GetProductId returns the id of the product.
func (Product) GetProductImageUrl ¶
GetProductImageUrl returns the sku of the product.
func (Product) GetProductInvoiceDescription ¶
GetProductInvoiceDescription returns the invoice description of the product.
func (Product) GetProductName ¶
GetProductName returns the name of the product.
func (Product) GetProductPreorderDetails ¶
GetProductPreorderDetails returns the invoice description of the product.
func (Product) GetProductPrice ¶
GetProductPrice returns the price of the product.
func (Product) GetProductSku ¶
GetProductSku returns the sku of the product.
type ProductCategories ¶
type ProductCategories []interface{}
func GetProductCategories ¶
func GetProductCategories() ProductCategories
EFFECTS: Returns product categories.
type ProductCategory ¶
type ProductCategory map[string]interface{}
func (ProductCategory) GetProductCategoryName ¶
func (productCategory ProductCategory) GetProductCategoryName() string
func (ProductCategory) GetProductIdsFromCategory ¶
func (productCategory ProductCategory) GetProductIdsFromCategory() []interface{}
EFFECTS: Returns the sku of the product option.
type ProductOption ¶
type ProductOption map[string]interface{}
ProductOption implements the product option returned from the response.
func (ProductOption) GetProductIdFromOption ¶
func (productOption ProductOption) GetProductIdFromOption() float64
GetProductIdFromOption returns the product id.
func (ProductOption) GetProductOptionAppendSku ¶
func (productOption ProductOption) GetProductOptionAppendSku() string
GetProductOptionAppendSku returns the sku of the product option.
func (ProductOption) GetProductOptionDescription ¶
func (productOption ProductOption) GetProductOptionDescription() string
GetProductOptionDescription returns the description of the product option.
func (ProductOption) GetProductOptionInvoiceDescription ¶
func (productOption ProductOption) GetProductOptionInvoiceDescription() string
GetProductOptionInvoiceDescription returns the invoice description of the product option.
func (ProductOption) GetProductOptionPriceChange ¶
func (productOption ProductOption) GetProductOptionPriceChange() string
GetProductOptionPriceChang returns the price change of the product option.
type ProductOptions ¶
type ProductOptions []interface{}
ProductOptions is just a list of ProductOption(s)
func GetProductOptions ¶
func GetProductOptions() ProductOptions
GetProductOptions returns product options.
type ResponseError ¶
Error returned if there was an issue parsing the response body.
func NewResponseError ¶
func NewResponseError(code int, body string) ResponseError
func (ResponseError) Error ¶
func (e ResponseError) Error() string
type SMS ¶
type SMS map[string]interface{}
SMS implements the SMS type returned from the response.
func SendSMSToDevice ¶
SendSMSToDevice sends an SMS to a device and returns the response.
type Session ¶
type Session map[string]interface{}
Session implements the Session type returned from the response.
func CreateSession ¶
CreateSession creates a new session.
func EndSession ¶
EndSession destroys a session based on the given sesskey.
type User ¶
type User map[string]interface{}
User implements the User type returned from the response.
func ChangeUserPassword ¶
ChangeUserPassword changes the user's password.
func CreateUser ¶
CreateUser makes a HTTP Post call to create a new user.
func GetUserAccountDetails ¶
GetUserAccountDetails returns the user's account details based on the given userid.
func (User) GetUserAPIKey ¶
GetUserAPIKey returns the user's API key.
func (User) GetUserFirstName ¶
GetUserFirstName returns the first name of the given user.
func (User) GetUserLastName ¶
GetUserLastName returns the last name of the given user.
func (User) GetUserRole ¶
GetUserRole returns the role of the user.