webservice

package
v0.0.0-...-03c68b9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

* Copyright Project - Stockbinator, Author - quoeamaster, (C) 2019 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StructCron

type StructCron struct {
	// contains filtered or unexported fields
}

func NewStructCron

func NewStructCron(pCfg *config.StructConfig) (cron *StructCron)

creation method for StructCron

func (*StructCron) CreateWebservice

func (c *StructCron) CreateWebservice() *restful.WebService

func (*StructCron) RunCron

func (c *StructCron) RunCron() (err error)

start the cron ticker loop if it was not started yet

func (*StructCron) StopCron

func (c *StructCron) StopCron() (err error)

stop the running cron ticker loop

func (*StructCron) UpsertTimeCron

func (c *StructCron) UpsertTimeCron(hour24, min, sec int, timezone, stocksModuleRule string) (inserted bool, err error)

method to update or insert a cron schedule and its corresponding method. However this cron service only handles hour, min, sec and timezone and excludes year, month and date.

type StructCronEntry

type StructCronEntry struct {
	// display name for the cron-time; it could be in any timezone
	DisplayName string
	// UTC converted time / date
	UTCTime time.Time
	// list of stocksModuleRule under this cron-time entry (usually size of 1)
	StocksModuleRuleList []string
	// contains filtered or unexported fields
}

structure contains the display-name of the cron-time entry; plus a UTC converted time object, finally a list of stocks-module-rule(s) associated

func NewStructCronEntry

func NewStructCronEntry() (entry *StructCronEntry)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL