Documentation ¶
Overview ¶
TODO - read / write Max | Min. Here and repo
Copyright 2021 M1K *
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 *
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.
Copyright 2021 M1K *
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 *
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.
Copyright 2021 M1K *
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 *
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.
Copyright 2021 M1K *
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 *
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.
Copyright 2021 M1K *
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 *
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.
Copyright 2021 M1K *
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 *
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 ¶
- func IsTradingHours() bool
- type Alert
- type Crypto
- type DB
- func (d *DB) CreateCrypto(coin, author string, spt, ept, poi, stop float32, channelType int, ...) (chan bool, bool, error)
- func (d *DB) CreateOption(guildID, author string, channelType int, ...) (chan bool, string, bool, error)
- func (d *DB) CreateShort(stock, author string, channelType int, spt, ept, poi, stop float32, ...) (chan bool, bool, error)
- func (d *DB) CreateStock(stock, author string, channelType int, spt, ept, poi, stop float32, ...) (chan bool, bool, error)
- func (d *DB) CryptoPOIHit(guildID, coin string) error
- func (d *DB) CryptoSetNewHigh(guildID, coin string, price float32) error
- func (d *DB) GetCrypto(guildID, coin string) (*Crypto, error)
- func (d *DB) GetExitChan(guildid, index string) chan bool
- func (d *DB) GetOption(guildID, oID string) (*Option, error)
- func (d *DB) GetShort(guildID, stock string) (*Short, error)
- func (d *DB) GetStock(guildID, stock string) (*Stock, error)
- func (d *DB) OptionPOIHit(guildID, oID string) error
- func (d *DB) OptionSetNewHigh(guildID, uid string, price float32) error
- func (d *DB) RefreshFromDB(guildID string) ([]*Stock, []*Short, []*Option, []*Crypto, error)
- func (d *DB) RemoveCrypto(guildID, coin string) error
- func (d *DB) RemoveOption(guildID, ticker, contractType, day, month, year string, price float32) error
- func (d *DB) RemoveOptionByCode(guildID, oID string) error
- func (d *DB) RemoveShort(guildID, stock string) error
- func (d *DB) RemoveStock(guildID, stock string) error
- func (d *DB) RmAll(guildID string) error
- func (d *DB) SetAndReturnNewExitChan(guildid, index string, exitChan chan bool) chan bool
- func (d *DB) ShortPOIHit(guildID, ticker string) error
- func (d *DB) ShortSetNewHigh(guildID, uid string, price float32) error
- func (d *DB) ShowAll(guildID string) []string
- func (d *DB) StockPOIHit(guildID, ticker string) error
- func (d *DB) StockSetNewHigh(guildID, uid string, price float32) error
- type Option
- type Short
- type Stock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTradingHours ¶
func IsTradingHours() bool
Types ¶
type Crypto ¶
type Crypto struct { CryptoAlertID string `bun:",pk"` CryptoGuildID string CryptoCoin string CryptoStarting float32 CryptoSPt float32 CryptoEPt float32 CryptoExpiry int64 CryptoHighest float32 CryptoStop float32 CryptoPoI float32 ChannelType int Caller string CryptoPOIHit bool CryptoCallTime time.Time }
func (Crypto) GetPctGain ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func InitDBConnection ¶
func (*DB) CreateCrypto ¶
func (*DB) CreateOption ¶
func (*DB) CreateShort ¶
func (*DB) CreateStock ¶
func (*DB) CryptoPOIHit ¶
func (*DB) CryptoSetNewHigh ¶
func (*DB) GetExitChan ¶
func (*DB) OptionPOIHit ¶
func (*DB) OptionSetNewHigh ¶
func (*DB) RefreshFromDB ¶
func (*DB) RemoveCrypto ¶
func (*DB) RemoveOption ¶
func (*DB) RemoveOptionByCode ¶
func (*DB) RemoveShort ¶
func (*DB) RemoveStock ¶
func (*DB) SetAndReturnNewExitChan ¶
func (*DB) ShortPOIHit ¶
func (*DB) StockPOIHit ¶
type Option ¶
type Option struct { OptionAlertID string `bun:",pk"` OptionGuildID string OptionTicker string OptionUid string OptionContractType string OptionDay string OptionMonth string OptionYear string OptionStrike float32 OptionStarting float32 OptionHighest float32 OptionUnderlyingPoI float32 OptionUnderlyingStop float32 OptionUnderlyingStarting float32 ChannelType int Caller string OptionUnderlyingPOIHit bool OptionCallTime time.Time }
func (Option) GetPctGain ¶
type Short ¶
type Short struct { ShortAlertID string `bun:",pk"` ShortGuildID string ShortTicker string ShortStarting float32 ShortSPt float32 ShortEPt float32 ShortExpiry int64 ShortLowest float32 ShortPoI float32 ShortStop float32 ChannelType int Caller string ShortPOIHit bool ShortCallTime time.Time }
func (Short) GetPctGain ¶
type Stock ¶
type Stock struct { StockAlertID string `bun:",pk"` StockGuildID string StockTicker string StockStarting float32 StockEPt float32 StockSPt float32 StockExpiry int64 StockHighest float32 StockPoI float32 StockStop float32 ChannelType int Caller string StockPOIHit bool StockCallTime time.Time }