當前位置: 首頁>>代碼示例>>Golang>>正文


Golang BeeOptions.GetValue方法代碼示例

本文整理匯總了Golang中github.com/muesli/beehive/bees.BeeOptions.GetValue方法的典型用法代碼示例。如果您正苦於以下問題:Golang BeeOptions.GetValue方法的具體用法?Golang BeeOptions.GetValue怎麽用?Golang BeeOptions.GetValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在github.com/muesli/beehive/bees.BeeOptions的用法示例。


在下文中一共展示了BeeOptions.GetValue方法的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
}
開發者ID:Horrendus,項目名稱:beehive,代碼行數:8,代碼來源:spaceapibeefactory.go

示例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
}
開發者ID:Horrendus,項目名稱:beehive,代碼行數:8,代碼來源:efabeefactory.go

示例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
}
開發者ID:Horrendus,項目名稱:beehive,代碼行數:9,代碼來源:serialbeefactory.go

示例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
}
開發者ID:Horrendus,項目名稱:beehive,代碼行數:9,代碼來源:huebeefactory.go

示例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
}
開發者ID:Horrendus,項目名稱:beehive,代碼行數:10,代碼來源:emailbeefactory.go

示例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
}
開發者ID:Horrendus,項目名稱:beehive,代碼行數:12,代碼來源:cronbeefactory.go

示例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
}
開發者ID:Horrendus,項目名稱:beehive,代碼行數:13,代碼來源:tumblrbeefactory.go

示例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
}
開發者ID:Horrendus,項目名稱:beehive,代碼行數:15,代碼來源:rssbeefactory.go

示例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
}
開發者ID:Horrendus,項目名稱:beehive,代碼行數:11,代碼來源:twitterbeefactory.go

示例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
}
開發者ID:Horrendus,項目名稱:beehive,代碼行數:9,代碼來源:jenkinsbeefactory.go

示例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
}
開發者ID:Horrendus,項目名稱:beehive,代碼行數:10,代碼來源:nagiosbeefactory.go

示例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
}
開發者ID:Horrendus,項目名稱:beehive,代碼行數:21,代碼來源:ircbeefactory.go

示例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
}
開發者ID:Horrendus,項目名稱:beehive,代碼行數:13,代碼來源:timebeefactory.go


注:本文中的github.com/muesli/beehive/bees.BeeOptions.GetValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。