本文整理匯總了Golang中github.com/muesli/beehive/bees.BeeOptions類的典型用法代碼示例。如果您正苦於以下問題:Golang BeeOptions類的具體用法?Golang BeeOptions怎麽用?Golang BeeOptions使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了BeeOptions類的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: New
func (factory *SpaceApiBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
bee := SpaceApiBee{
Bee: bees.NewBee(name, factory.Name(), description),
url: options.GetValue("url").(string),
}
return &bee
}
示例2: New
func (factory *EFABeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
bee := EFABee{
Bee: bees.NewBee(name, factory.Name(), description),
Provider: options.GetValue("provider").(string),
}
return &bee
}
示例3: New
func (factory *SerialBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
bee := SerialBee{
Bee: bees.NewBee(name, factory.Name(), description),
device: options.GetValue("device").(string),
baudrate: int(options.GetValue("baudrate").(float64)),
}
return &bee
}
示例4: New
func (factory *HueBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
bee := HueBee{
Bee: bees.NewBee(name, factory.Name(), description),
bridge: options.GetValue("bridge").(string),
key: options.GetValue("key").(string),
}
return &bee
}
示例5: New
func (factory *EmailBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
bee := EmailBee{
Bee: bees.NewBee(name, factory.Name(), description),
username: options.GetValue("username").(string),
password: options.GetValue("password").(string),
server: options.GetValue("server").(string),
}
return &bee
}
示例6: New
func (factory *CronBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
bee := CronBee{
Bee: bees.NewBee(name, factory.Name(), description),
}
bee.input[0] = options.GetValue("Second").(string)
bee.input[1] = options.GetValue("Minute").(string)
bee.input[2] = options.GetValue("Hour").(string)
bee.input[3] = options.GetValue("DayOfWeek").(string)
bee.input[4] = options.GetValue("DayOfMonth").(string)
bee.input[5] = options.GetValue("Month").(string)
return &bee
}
示例7: New
func (factory *TumblrBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
bee := TumblrBee{
Bee: bees.NewBee(name, factory.Name(), description),
blogname: options.GetValue("blogname").(string),
callbackUrl: options.GetValue("callback_url").(string),
consumerKey: options.GetValue("consumer_key").(string),
consumerSecret: options.GetValue("consumer_secret").(string),
token: options.GetValue("token").(string),
tokenSecret: options.GetValue("token_secret").(string),
}
return &bee
}
示例8: New
func (factory *RSSBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
var skip bool
if tmp := options.GetValue("skip_first"); tmp != nil {
skip = tmp.(bool)
} else {
skip = false
}
bee := RSSBee{
Bee: bees.NewBee(name, factory.Name(), description),
url: options.GetValue("url").(string),
skip_next_fetch: skip,
}
return &bee
}
示例9: New
func (factory *TwitterBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
bee := TwitterBee{
Bee: bees.NewBee(name, factory.Name(), description),
consumer_key: options.GetValue("consumer_key").(string),
consumer_secret: options.GetValue("consumer_secret").(string),
access_token: options.GetValue("access_token").(string),
access_token_secret: options.GetValue("access_token_secret").(string),
}
return &bee
}
示例10: New
func (factory *JenkinsBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
bee := JenkinsBee{
Bee: bees.NewBee(name, factory.Name(), description),
url: options.GetValue("url").(string),
user: options.GetValue("user").(string),
password: options.GetValue("password").(string),
}
return &bee
}
示例11: New
func (factory *NagiosBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
bee := NagiosBee{
Bee: bees.NewBee(name, factory.Name(), description),
url: options.GetValue("url").(string),
user: options.GetValue("user").(string),
password: options.GetValue("password").(string),
}
bee.services = make(map[string]map[string]service)
return &bee
}
示例12: New
func (factory *IrcBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
bee := IrcBee{
Bee: bees.NewBee(name, factory.Name(), description),
server: options.GetValue("server").(string),
nick: options.GetValue("nick").(string),
}
for _, channel := range options.GetValue("channels").([]interface{}) {
bee.channels = append(bee.channels, channel.(string))
}
// optional parameters
if options.GetValue("password") != nil {
bee.password = options.GetValue("password").(string)
}
if options.GetValue("ssl") != nil {
bee.ssl = options.GetValue("ssl").(bool)
}
return &bee
}
示例13: New
func (factory *TimeBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
bee := TimeBee{
Bee: bees.NewBee(name, factory.Name(), description),
second: int(options.GetValue("Second").(float64)),
minute: int(options.GetValue("Minute").(float64)),
hour: int(options.GetValue("Hour").(float64)),
dayofweek: int(options.GetValue("DayOfWeek").(float64)),
dayofmonth: int(options.GetValue("DayOfMonth").(float64)),
month: int(options.GetValue("Month").(float64)),
year: int(options.GetValue("Year").(float64)),
}
return &bee
}