Documentation
¶
Overview ¶
! Copyright © 2022 chouette.21.00@gmail.com Released under the MIT license https://opensource.org/licenses/mit-license.php Ver. 0.1.0 ApiLiveCurrentUser.goをsrapi.goから分離する。ApiLiveCurrentUser()のRoomIDをstring型に変更する。
Index ¶
- Constants
- Variables
- func GetAciveFanByAPI(room_id string, yyyymm string) (nofan int)
- func GetAndInsertEventRoomInfo(eventid string, breg int, ereg int, eventinfo *Event_Inf, ...) (starttimeafternow bool, status int)
- func GetEventInf(eventid string, eventinfo *Event_Inf) (status int)
- func GetEventInfAndRoomList(eventid string, breg int, ereg int, eventinfo *Event_Inf, ...) (status int)
- func GetEventListByAPI(eventinflist *[]Event_Inf) (status int)
- func GetIsOnliveByAPI(room_id string) (isonlive bool, startedat time.Time, status int)
- func GetNextliveByAPI(room_id string) (nextlive string, status int)
- func GetPointsByAPI(id string) (Point, Rank, Gap int, EventID string)
- func GetRoomInfoByAPI(room_id string) (genre string, rank string, nrank string, prank string, level int, ...)
- func GetUserInfForHistory() (status int)
- func InsertEventInf(eventinf *Event_Inf) (status int)
- func InsertIntoEventUser(i int, eventid string, roominf RoomInfo) (status int)
- func InsertIntoOrUpdateUser(tnow time.Time, eventid string, roominf RoomInfo) (status int)
- func InsertRoomInf(eventid string, roominfolist *RoomInfoList)
- func OpenDb() (status int)
- func SelectAcqTimeList(eventid string, userno int) (acqtimelist []time.Time, status int)
- func SelectEventInfAndRoomList() (IDlist []int, status int)
- func SelectEventNoAndName(eventid string) (eventname string, period string, status int)
- func SelectEventRoomInfList(eventid string, roominfolist *RoomInfoList) (eventname string, status int)
- func UpdateEventInf(eventinf *Event_Inf) (status int)
- func UpdateEventuserSetPoint(eventid, userid string, point int) (status int)
- func UpdateRoomInf(...) (status int)
- type Color
- type ColorInf
- type ColorInfList
- type DBConfig
- type Event
- type Event_Inf
- type RoomInfo
- type RoomInfoList
- type RoomLevel
- type RoomLevelInf
- type User
Constants ¶
View Source
const Version = "010AE00"
Variables ¶
View Source
var Colorlist1 []Color = []Color{
{"cyan", "cyan"},
{"magenta", "magenta"},
{"yellow", "yellow"},
{"royalblue", "royalblue"},
{"coral", "coral"},
{"khaki", "khaki"},
{"deepskyblue", "deepskyblue"},
{"crimson", "crimson"},
{"orange", "orange"},
{"lightsteelblue", "lightsteelblue"},
{"pink", "pink"},
{"sienna", "sienna"},
{"springgreen", "springgreen"},
{"blueviolet", "blueviolet"},
{"salmon", "salmon"},
{"lime", "lime"},
{"red", "red"},
{"darkorange", "darkorange"},
{"skyblue", "skyblue"},
{"lightpink", "lightpink"},
}
View Source
var Colorlist2 []Color = []Color{
{"red", "#FF2800"},
{"yellow", "#FAF500"},
{"green", "#35A16B"},
{"blue", "#0041FF"},
{"skyblue", "#66CCFF"},
{"lightpink", "#FFD1D1"},
{"orange", "#FF9900"},
{"purple", "#9A0079"},
{"brown", "#663300"},
{"lightgreen", "#87D7B0"},
{"white", "#FFFFFF"},
{"gray", "#77878F"},
}
https://www.fukushihoken.metro.tokyo.lg.jp/kiban/machizukuri/kanren/color.files/colorudguideline.pdf
View Source
var Db *sql.DB
View Source
var Err error
View Source
var OS string
View Source
var SortByFollowers bool
Functions ¶
func GetAciveFanByAPI ¶
func GetEventInf ¶
func GetEventInfAndRoomList ¶
func GetEventListByAPI ¶
func GetIsOnliveByAPI ¶
func GetNextliveByAPI ¶
func GetPointsByAPI ¶
idで指定した配信者さんの獲得ポイントを取得する。 戻り値は 獲得ポイント、順位、上位とのポイント差(1位の場合は2位とのポイント差)、イベント名 レベルイベントのときは順位、上位とのポイント差は0がセットされる。
func GetRoomInfoByAPI ¶
func GetUserInfForHistory ¶
func GetUserInfForHistory() (status int)
func InsertEventInf ¶
func InsertIntoEventUser ¶
func InsertIntoOrUpdateUser ¶
func InsertRoomInf ¶
func InsertRoomInf(eventid string, roominfolist *RoomInfoList)
func SelectAcqTimeList ¶
SelectAcqTimeList()
指定したイベント、ユーザーの貢献ランキングを取得した時刻の一覧を取得する。
引数
eventid string イベントID
userno int ユーザーID
戻り値
acqtimelist [] time.Time 取得時刻一覧
func SelectEventNoAndName ¶
func SelectEventRoomInfList ¶
func SelectEventRoomInfList( eventid string, roominfolist *RoomInfoList, ) ( eventname string, status int, )
func UpdateEventInf ¶
func UpdateEventuserSetPoint ¶
func UpdateRoomInf ¶
Types ¶
type ColorInfList ¶
type ColorInfList []ColorInf
type DBConfig ¶
type DBConfig struct {
WebServer string `yaml:"WebServer"`
HTTPport string `yaml:"HTTPport"`
SSLcrt string `yaml:"SSLcrt"`
SSLkey string `yaml:"SSLkey"`
Dbhost string `yaml:"Dbhost"`
Dbname string `yaml:"Dbname"`
Dbuser string `yaml:"Dbuser"`
Dbpw string `yaml:"Dbpw"`
}
var Dbconfig *DBConfig
type Event ¶
type Event struct {
EventID string
EventName string
Period string
Starttime time.Time
S_start string
Endtime time.Time
S_end string
Status string
Pntbasis int
Pbname string
Selected string
}
func SelectLastEventList ¶
type Event_Inf ¶
type Event_Inf struct {
Event_ID string
I_Event_ID int
Event_name string
Event_no int
MaxPoint int
Start_time time.Time
Sstart_time string
Start_date float64
End_time time.Time
Send_time string
Period string
Dperiod float64
Intervalmin int
Modmin int
Modsec int
Fromorder int
Toorder int
Resethh int
Resetmm int
Nobasis int
Maxdsp int
NoEntry int
NoRoom int // ルーム数
EventStatus string // "Over", "BeingHeld", "NotHeldYet"
Pntbasis int
Ordbasis int
League_ids string
Cmap int
Target int
Maxpoint int
}
var Event_inf Event_Inf
func SelectEventInf ¶
type RoomInfo ¶
type RoomInfo struct {
Name string // ルーム名のリスト
Longname string
Shortname string
Account string // アカウントのリスト、アカウントは配信のURLの最後の部分の英数字です。
ID string // IDのリスト、IDはプロフィールのURLの最後の部分で5~6桁の数字です。
Userno int
// APIで取得できるデータ(1)
Genre string
Rank string
Irank int
Nrank string
Prank string
Followers int
Sfollowers string
Fans int
Fans_lst int
Level int
Slevel string
// APIで取得できるデータ(2)
Order int
Point int // イベント終了後12時間〜36時間はイベントページから取得できることもある
Spoint string
Istarget string
Graph string
Iscntrbpoint string
Color string
Colorvalue string
Colorinflist ColorInfList
Formid string
Eventid string
Status string
Statuscolor string
}
func GetRoomInfoAndPoint ¶
func SelectRoomInf ¶
type RoomInfoList ¶
type RoomInfoList []RoomInfo
func (RoomInfoList) Choose ¶
func (r RoomInfoList) Choose(from, to int) (s RoomInfoList)
func (RoomInfoList) Swap ¶
func (r RoomInfoList) Swap(i, j int)
type RoomLevelInf ¶
func SelectRoomLevel ¶
func SelectRoomLevel(userno int, levelonly int) (roomlevelinf RoomLevelInf, status int)
Click to show internal directories.
Click to hide internal directories.