ShowroomCGIlib

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const MaxAcq = 5
View Source
const VerFileIOlib = "11AA00"
View Source
const Version = "11AP01"

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 Event_inf exsrapi.Event_Inf
View Source
var SortByFollowers bool

Functions

func DetXaxScale

func DetXaxScale(
	xupper float64,
) (
	xscaled int,
	xscalet int,
	status int,
)

func DetYaxScale

func DetYaxScale(
	maxpoint int,
) (
	yupper int,
	yscales int,
	yscalel int,
	status int,
)

func FindHistoricalData added in v1.1.0

func FindHistoricalData(
	eventinflist *[]exsrapi.Event_Inf,
) (
	err error,
)

イベントがeventとwebentに共通して存在するかチェックする。

func FindPtPerSlot added in v1.1.0

func FindPtPerSlot(eventid string, roomlist *[]srapi.Room) (
	err error,
)

func GetAciveFanByAPI

func GetAciveFanByAPI(room_id string, yyyymm string) (nofan int)

func GetAndInsertEventRoomInfo

func GetAndInsertEventRoomInfo(
	client *http.Client,
	eventid string,
	breg int,
	ereg int,
	eventinfo *exsrapi.Event_Inf,
	roominfolist *RoomInfoList,
) (
	starttimeafternow bool,
	status int,
)

func GetEventInf

func GetEventInf(
	eventid string,
	eventinfo *exsrapi.Event_Inf,
) (
	status int,
)

func GetEventInfAndRoomList

func GetEventInfAndRoomList(
	eventid string,
	breg int,
	ereg int,
	eventinfo *exsrapi.Event_Inf,
	roominfolist *RoomInfoList,
) (
	status int,
)

func GetEventInfAndRoomListBR

func GetEventInfAndRoomListBR(
	client *http.Client,
	eventid string,
	breg int,
	ereg int,
	eventinfo *exsrapi.Event_Inf,
	roominfolist *RoomInfoList,
) (
	status int,
)

func GetEventListByAPI

func GetEventListByAPI(eventinflist *[]exsrapi.Event_Inf) (status int)

func GetIsOnliveByAPI

func GetIsOnliveByAPI(room_id string) (
	isonlive bool,
	startedat time.Time,
	status int,
)

func GetNextliveByAPI

func GetNextliveByAPI(room_id string) (
	nextlive string,
	status int,
)

func GetPointsByAPI

func GetPointsByAPI(id string) (Point, Rank, Gap int, EventID string)

idで指定した配信者さんの獲得ポイントを取得する。 戻り値は 獲得ポイント、順位、上位とのポイント差(1位の場合は2位とのポイント差)、イベント名 レベルイベントのときは順位、上位とのポイント差は0がセットされる。

func GetRoomInfoByAPI

func GetRoomInfoByAPI(room_id string) (
	genre string,
	rank string,
	nrank string,
	prank string,
	level int,
	followers int,
	fans int,
	fans_lst int,
	roomname string,
	roomurlkey string,
	startedat time.Time,
	status int,
)

func GetSerialFromYymmddHhmmss

func GetSerialFromYymmddHhmmss(yymmdd, hhmmss string) (tserial float64)

func GetUserInf

func GetUserInf(r *http.Request)

ファンクション名とリモートアドレス、ユーザーエージェントを表示する。

func GetUserInfForHistory

func GetUserInfForHistory() (status int)

func GetWeightedCnt

func GetWeightedCnt(pcl Pclist, nfr int)

func GraphPerDay

func GraphPerDay(
	eventid string,
	pointperday *PointPerDay,
) (
	filename string,
	status int,
)

func GraphPerSlot

func GraphPerSlot(
	eventid string,
	perslotinflist *[]PerSlotInf,
) (
	filename string,
	status int,
)

func GraphScore01

func GraphScore01(filename string, IDlist []int, eventname string, period string, maxpoint int)

func GraphTotalPoints

func GraphTotalPoints(eventid string, maxpoint int, gscale int) (filename string, status int)

func HandlerAddEvent

func HandlerAddEvent(w http.ResponseWriter, r *http.Request)

イベントを獲得ポイントデータ取得の対象としてeventテーブルに登録する。 イベントが開催中であれば指定した順位内のルームを取得対象として登録する。 イベントが開催予定のものであればルームの登録は行わない。 イベント開催中、開催予定にかかわらず、取得対象ルームの追加は srAddNewOnes で行われる。

func HandlerClosedEventRoomList added in v1.2.0

func HandlerClosedEventRoomList(
	w http.ResponseWriter,
	r *http.Request,
)
ApiEventRoomList() の戻り値を表示する。

Ver. 0.1.0

"/ApiEventRoomList()"に対するハンドラー http://localhost:8080/apieventroomlist で呼び出される

func HandlerClosedEvents added in v1.2.0

func HandlerClosedEvents(
	w http.ResponseWriter,
	r *http.Request,
)

終了イベント一覧を表示する。

func HandlerCsvTotal

func HandlerCsvTotal(w http.ResponseWriter, r *http.Request)

func HandlerCurrentDistributors added in v1.2.0

func HandlerCurrentDistributors(
	w http.ResponseWriter,
	r *http.Request,
)

"/t009top"に対するハンドラー http://localhost:8080/t009top で呼び出される

func HandlerCurrentEvents added in v1.2.0

func HandlerCurrentEvents(
	w http.ResponseWriter,
	r *http.Request,
)

"/T999Dtop"に対するハンドラー http://localhost:8080/T999Dtop で呼び出される

func HandlerEditUser

func HandlerEditUser(w http.ResponseWriter, r *http.Request)

func HandlerEventRoomList added in v1.1.0

func HandlerEventRoomList(
	w http.ResponseWriter,
	r *http.Request,
)

"/ApiEventRoomList()"に対するハンドラー http://localhost:8080/apieventroomlist で呼び出される

func HandlerFanLevel

func HandlerFanLevel(w http.ResponseWriter, req *http.Request)

func HandlerFlRanking

func HandlerFlRanking(w http.ResponseWriter, req *http.Request)

func HandlerGraphDfr

func HandlerGraphDfr(w http.ResponseWriter, r *http.Request)

func HandlerGraphPerday

func HandlerGraphPerday(w http.ResponseWriter, r *http.Request)

func HandlerGraphPerslot

func HandlerGraphPerslot(w http.ResponseWriter, r *http.Request)

func HandlerGraphTotal

func HandlerGraphTotal(w http.ResponseWriter, req *http.Request)

func HandlerListCntrb

func HandlerListCntrb(w http.ResponseWriter, req *http.Request)

func HandlerListCntrbH

func HandlerListCntrbH(w http.ResponseWriter, req *http.Request)

func HandlerListCntrbS

func HandlerListCntrbS(w http.ResponseWriter, req *http.Request)

func HandlerListLast

func HandlerListLast(w http.ResponseWriter, req *http.Request)

func HandlerListLevel

func HandlerListLevel(w http.ResponseWriter, req *http.Request)

func HandlerListPerday

func HandlerListPerday(w http.ResponseWriter, r *http.Request)

func HandlerListPerslot

func HandlerListPerslot(w http.ResponseWriter, r *http.Request)

func HandlerNewEvent

func HandlerNewEvent(w http.ResponseWriter, r *http.Request)

func HandlerNewUser

func HandlerNewUser(w http.ResponseWriter, r *http.Request)

func HandlerParamEvent

func HandlerParamEvent(w http.ResponseWriter, r *http.Request)

func HandlerParamEventC

func HandlerParamEventC(w http.ResponseWriter, r *http.Request)

func HandlerParamGlobal

func HandlerParamGlobal(w http.ResponseWriter, r *http.Request)

func HandlerParamLocal

func HandlerParamLocal(w http.ResponseWriter, r *http.Request)

func HandlerScheduledEvents added in v1.2.0

func HandlerScheduledEvents(
	w http.ResponseWriter,
	r *http.Request,
)

"/T999Dtop"に対するハンドラー http://localhost:8080/T999Dtop で呼び出される

func HandlerScheduledEventsSvr added in v1.2.0

func HandlerScheduledEventsSvr(
	w http.ResponseWriter,
	r *http.Request,
)

"/t008top"に対するハンドラー http://localhost:8080/t008top で呼び出される

func HandlerTopForm

func HandlerTopForm(w http.ResponseWriter, r *http.Request)

入力フォーム画面

func HandlerTopRoom added in v1.3.0

func HandlerTopRoom(
	w http.ResponseWriter,
	r *http.Request,
)
SelectTopRoom() の戻り値を表示する。

Ver. 0.1.0

http://localhost:8080/toproom で呼び出される

func InsertEventInf

func InsertEventInf(eventinf *exsrapi.Event_Inf) (
	status int,
)

func InsertIntoEventUser

func InsertIntoEventUser(i int, eventid string, roominf RoomInfo) (status int)

func InsertIntoOrUpdateUser

func InsertIntoOrUpdateUser(tnow time.Time, eventid string, roominf RoomInfo) (status int)

func InsertRoomInf

func InsertRoomInf(eventid string, roominfolist *RoomInfoList)

func InsertTargetIntoTimtable

func InsertTargetIntoTimtable(eventid string, userno int, ts time.Time, nfr int) (target int, status int)

func MakeSampleTime

func MakeSampleTime(
	cval int,
	cvar int,
) (stm, sts int)

MakeSampleTime() 獲得ポイントを取得するタイミングをランダムに返す

5分に一回を前提として、240秒±40秒のように設定する。

func Mark

func Mark(j int, canvas *svg.SVG, x0, y0, d float64, color string)

func SelectAcqTimeList

func SelectAcqTimeList(eventid string, userno int) (acqtimelist []time.Time, status int)
        SelectAcqTimeList()
		指定したイベント、ユーザーの貢献ランキングを取得した時刻の一覧を取得する。

        引数
		eventid			string			イベントID
		userno			int				ユーザーID

        戻り値
        acqtimelist		[] time.Time	取得時刻一覧

func SelectCntrb

func SelectCntrb(
	eventid string,
	userno int,
	ts time.Time,
	cntrbinflist *[]CntrbInf,
	tlsnid2order map[int]int,
) (
	status int,
)
		指定したイベント、ユーザー、時刻の貢献ポイントランキングを取得する。
		ここでは順位と累計貢献ポイントは取得しない。

        引数
		eventid			string			イベントID
		userno			int				ユーザーID
		ts				int				ユーザーID
		loc				int				取得データの格納位置
		loc				int				データの格納場所( 0 だったら先頭)

        戻り値
        cntrbinflist	[] CntrbInf		貢献ポイントランキング(最終貢献ポイント順)
		stats			int				== 0 正常終了	!= 0 データベースアクセス時のエラー

func SelectCntrbHeader

func SelectCntrbHeader(
	eventid string,
	userno int,
	ts time.Time,
	cntrbheader *CntrbHeader,
) (
	status int,
)
        SelectCntrbHeader()
		貢献ランキング表のヘッダ部分に必要な配信開始・終了時刻を取得する。

        引数
		eventid			string			イベントID
		userno			int				配信者ID
		ts				time.Time		枠を特定する時刻(=貢献ランキングを取得した時刻)
		cntrbheader		*CntrbHeader	配信開始・終了時刻を格納する構造体

        戻り値
		status			int				終了ステータス( 0: 正常、 1: DBアクセスでの異常)

func SelectEventInfAndRoomList

func SelectEventInfAndRoomList() (IDlist []int, status int)

func SelectEventNoAndName

func SelectEventNoAndName(eventid string) (
	eventname string,
	period string,
	status int,
)

func SelectEventRoomInfList

func SelectEventRoomInfList(
	eventid string,
	roominfolist *RoomInfoList,
) (
	eventname string,
	status int,
)

func SelectEventinflistFromEvent added in v1.1.0

func SelectEventinflistFromEvent(
	cond int,
	mode int,
	keyword string,
	kwevid string,
) (
	eventinflist []exsrapi.Event_Inf,
	err error,
)

指定した条件に該当するイベントのリストを作る。

func SelectEventinflistFromEventByRoom added in v1.2.0

func SelectEventinflistFromEventByRoom(
	cond int,
	mode int,
	userno int,
) (
	eventinflist []exsrapi.Event_Inf,
	err error,
)

指定した条件に該当するイベントのリストを作る。

func SelectLastdataFromWeventuser added in v1.2.0

func SelectLastdataFromWeventuser(
	client *http.Client,
	eventurlkey string,
	ib int,
	ie int,
) (
	roomlistinf *srapi.RoomListInf,
	err error,
)

func SelectPointList

func SelectPointList(userno int, eventid string) (norow int, tp *[]time.Time, pp *[]int)

func SelectScoreList

func SelectScoreList(user_id int) (x *[]float64, y *[]float64)

func SelectTargetfromTimetable added in v1.2.0

func SelectTargetfromTimetable(
	eventid string,
	userno int,
	ts time.Time,
) (
	target int,
	err error,
)

func SelectUserColor

func SelectUserColor(userno int, eventid string) (
	color string,
	colorvalue string,
	status int,
)

func SelectUserName

func SelectUserName(userno int) (
	longname string,
	shortname string,
	genre string,
	rank string,
	nrank string,
	prank string,
	level int,
	followers int,
	fans int,
	fans_lst int,
	status int,
)

func SelectUsernoAndName added in v1.2.0

func SelectUsernoAndName(
	Keywordrm string,
	limit int,
	offset int,
) (
	roomlist *[]Room,
	err error,
)

func UpdateEventInf

func UpdateEventInf(eventinf *exsrapi.Event_Inf) (
	status int,
)

func UpdateEventuserSetPoint

func UpdateEventuserSetPoint(eventid, userid string, point int) (status int)

func UpdatePointsSetQstatus

func UpdatePointsSetQstatus(
	eventid string,
	userno int,
	tstart string,
	tend string,
	point string,
) (status int)

func UpdateRoomInf

func UpdateRoomInf(eventid, suserno, longname, shortname, istarget, graph, color, iscntrbpoint string) (status int)

func UpdateTimetableSetTarget added in v1.2.0

func UpdateTimetableSetTarget(
	eventid string,
	userno int,
	ts time.Time,
	target int,
) (
	err error,
)

Types

type CntrbH_Header

type CntrbH_Header struct {
	Eventid    string
	Eventname  string
	Period     string
	Maxpoint   int
	Gscale     int
	Userno     int
	Username   string
	ShortURL   string
	Tlsnid     int
	Listener   string
	Ie         int
	Tlsnid_b   int
	Listener_b string
	Tlsnid_f   int
	Listener_f string
}

type CntrbHeader

type CntrbHeader struct {
	Eventid      string
	Eventname    string
	Period       string
	Maxpoint     int
	Gscale       int
	Userno       int
	Username     string
	ShortURL     string
	Ier          int
	Iel          int
	S_stime      []string
	S_etime      []string
	Earned       []int
	Total        []int
	Target       []int
	Ifrm         []int
	Nof          []int
	Nft          int //	先頭に戻ったときの最後に表示される枠
	Npb          int //	1ページ戻る
	N1b          int //	一枠戻る
	Ncr          int
	N1f          int
	Npf          int
	Nlt          int
	Cntrbinflist *[]CntrbInf
}

type CntrbHistory

type CntrbHistory []CntrbHistoryInf

func SelectCntrbHistory

func SelectCntrbHistory(
	eventid string,
	userno int,
	tlsnid int,
	acqtimelist []time.Time,
) (
	cntrbhistory CntrbHistory,
	status int,
)

指定したリスナーの貢献ポイントの履歴を取得する。

type CntrbHistoryInf

type CntrbHistoryInf struct {
	S_stime     string
	S_etime     string
	Target      int
	Point       int
	Incremental int
	Listener    string
	Lastname    string
}

type CntrbInf

type CntrbInf struct {
	Ranking      int
	Point        int
	Incremental  []int
	ListenerName string
	LastName     string
	Tlsnid       int
	Eventid      string
	Userno       int
}

func SelectTlsnid2Order

func SelectTlsnid2Order(
	eventid string,
	userno int,
	ts time.Time,
) (
	cntrbinflist []CntrbInf,
	tlsnid2order map[int]int,
	status int,
)
        SelectTlsnid2Order()
		指定したイベント、配信者、枠の仮リスナーIDと貢献ポイントランキングの対応表を作成する。

        引数
		eventid			string			イベントID
		userno			int				配信者ID
		ts				time.Time		枠を特定する時刻(=貢献ランキングを取得した時刻)

        戻り値
		cntrbinflist	[]CntrbInf		貢献ポイントランキングを格納するための構造体の配列
										ここで累計貢献ポイント、リスナー名が格納される。
		tlsnid2order	map[int]int		仮リスナーIDと貢献ポイントランキングの対応表
		status			int				終了ステータス( 0: 正常、 1: DBアクセスでの異常)

type CntrbInfS

type CntrbInfS struct {
	Ranking      int
	Point        int
	Incremental  int
	ListenerName string
	LastName     string
	Tlsnid       int
	Eventid      string
	Userno       int
}

func SelectCntrbSingle

func SelectCntrbSingle(
	eventid string,
	userno int,
	ts time.Time,
	sort string,
) (
	cntrbinflists []CntrbInfS,
	status int,
)
        SelectCntrbSingle()

		指定したイベント、ユーザー、時刻の貢献ポイントランキングを一枠分だけ取得する。
		リスナー名の突き合わせのチェックを目的とするページを作るために使用する。

        引数
		eventid			string			イベントID
		userno			int				ユーザーID
		ts				int				ユーザーID
		loc				int				データの格納場所( 0 だったら先頭)

        戻り値
        cntrbinflists	[] CntrbInf		貢献ポイントランキング(最終貢献ポイント順)
		stats			int				== 0 正常終了	!= 0 データベースアクセス時のエラー

type CntrbS_Header

type CntrbS_Header struct {
	Eventid   string
	Eventname string
	Period    string
	Target    int
	Maxpoint  int
	Gscale    int
	Userno    int
	Username  string
	ShortURL  string
	S_stime   string
	S_etime   string
	Srt       int
	Ie        int
	Ifrm      int
	Ifrm1     int
	Ifrm_b    int
	Ifrm_f    int
}

type Color

type Color struct {
	Name  string
	Value string
}

type ColorInf

type ColorInf struct {
	Color      string
	Colorvalue string
	Selected   string
}

type ColorInfList

type ColorInfList []ColorInf

type CurrentScore

type CurrentScore struct {
	Rank      int
	Srank     string
	Userno    int
	Shorturl  string
	Eventid   string
	Username  string
	Roomgenre string
	Roomrank  string
	Roomnrank string
	Roomprank string
	Roomlevel string
	Followers string
	Fans      int
	Fans_lst  int
	NextLive  string
	Point     int
	Spoint    string
	Sdfr      string
	Pstatus   string
	Ptime     string
	Qstatus   string
	Qtime     string
	Bcntrb    bool
}

func SelectCurrentScore

func SelectCurrentScore(eventid string) (gtime time.Time, eventname string, period string, scorelist []CurrentScore, status int)

type Erl added in v1.2.0

type Erl struct {
	Eventid     int
	Eventname   string
	Eventurl    string
	Ib          int
	Ie          int
	Roomlistinf *srapi.RoomListInf
	Msg         string
	Eventlist   []srapi.Event
}

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
	Modmin    int
	Modsec    int
	Pbname    string
	Selected  string
	Maxpoint  int
	Gscale    int
}

func SelectEventList

func SelectEventList(userno int) (eventlist []Event, status int)

func SelectLastEventList

func SelectLastEventList() (eventlist []Event, status int)

type EventAndRankingInf

type EventAndRankingInf struct {
	Eventid        string
	Eventname      string
	Period         string
	Ts_lst         string
	Ts_nxt         string
	RankingInfList []RankingInf
}

func SelectFromNoOfFan

func SelectFromNoOfFan(eventid string) (eventandrankinginf EventAndRankingInf, status int)

type LevelForRoom

type LevelForRoom struct {
	User_id   int
	User_name string
	Level     int
	Level_lst int
}

type LevelForRoomW

type LevelForRoomW struct {
	Roomid   int
	Roomname string
	Lfr      []LevelForRoom
}

func SelectLevelForRoom

func SelectLevelForRoom(roomid int, yyyy int, mm int) (lfrw LevelForRoomW, status int)

type LevelForUser

type LevelForUser struct {
	Room_id   int
	Room_name string
	Level     int
	Level_lst int
}

type LevelForUserW

type LevelForUserW struct {
	Userid    int
	Username  string
	Levellist []LevelForUser
}

func SelectLevelForUser

func SelectLevelForUser(userid int, yyyy int, mm int) (lfuw LevelForUserW, status int)

type LongName

type LongName struct {
	Name string
}

type P_c

type P_c struct {
	Pnt  int
	Cnt  int
	Wcnt int
	Cmp  int
}

type Pclist

type Pclist []P_c

func (Pclist) Choose

func (p Pclist) Choose(from, to int) (s Pclist)

func (Pclist) Len

func (p Pclist) Len() int

sort.Sort()のための関数三つ

func (Pclist) Less

func (p Pclist) Less(i, j int) bool

func (Pclist) Swap

func (p Pclist) Swap(i, j int)

type PerSlot

type PerSlot struct {
	Timestart time.Time
	Dstart    string
	Tstart    string
	Tend      string
	Point     string
	Ipoint    int
	Tpoint    string
}

type PerSlotInf

type PerSlotInf struct {
	Eventname   string
	Eventid     string
	Period      string
	Roomname    string
	Roomid      int
	Perslotlist []PerSlot
}

func MakePointPerSlot

func MakePointPerSlot(eventid string) (perslotinflist []PerSlotInf, status int)

type Point

type Point struct {
	Pnt  int
	Spnt string
	Tpnt string
}

type PointPerDay

type PointPerDay struct {
	Eventid         string
	Eventname       string
	Period          string
	Maxpoint        int
	Gscale          int
	Usernolist      []int
	Longnamelist    []LongName
	Pointrecordlist []PointRecord
}

func MakePointPerDay

func MakePointPerDay(Event_inf exsrapi.Event_Inf) (p_pointperday *PointPerDay, status int)

func MakePointPerDay(eventid string) (p_pointperday *PointPerDay, status int) {

type PointRecord

type PointRecord struct {
	Day       string
	Tday      time.Time
	Pointlist []Point
}

type RankingInf

type RankingInf struct {
	Room_id   int
	Room_name string
	Srank     string
	Irank     int
	Irorder   int
	Iorder    int
	Fans      int
	Fans_lst  int
}

type Room added in v1.2.0

type Room struct {
	Userno    int
	User_name string
}
type T008top struct {
	TimeNow    int64
	Totalcount int
	ErrMsg     string
	Eventlist  []srapi.Event
}

type RoomInf

type RoomInf struct {
	Room_id   int
	Room_name string
}

func SelectFromFlroom

func SelectFromFlroom(roomid int) (roominflist []RoomInf, status int)

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 GetRoomInfoAndPoint(
	eventid string,
	roomid string,
	idbasis string,
) (
	roominf RoomInfo,
	status int,
)

func SelectRoomInf

func SelectRoomInf(
	userno int,
) (
	roominf RoomInfo,
	status int,
)

type RoomInfoList

type RoomInfoList []RoomInfo

func (RoomInfoList) Choose

func (r RoomInfoList) Choose(from, to int) (s RoomInfoList)

func (RoomInfoList) Len

func (r RoomInfoList) Len() int

sort.Sort()のための関数三つ

func (RoomInfoList) Less

func (r RoomInfoList) Less(i, j int) bool

降順に並べる

func (RoomInfoList) Swap

func (r RoomInfoList) Swap(i, j int)

type RoomLevel

type RoomLevel struct {
	User_name string
	Genre     string
	Rank      string
	Nrank     string
	Prank     string
	Level     int
	Followers int
	Fans      int
	Fans_lst  int

	Sts string
	// contains filtered or unexported fields
}

type RoomLevelInf

type RoomLevelInf struct {
	Userno        int
	User_name     string
	RoomLevelList []RoomLevel
}

func SelectRoomLevel

func SelectRoomLevel(userno int, levelonly int) (roomlevelinf RoomLevelInf, status int)

type SSHConfig added in v1.1.0

type SSHConfig struct {
	Hostname   string `yaml:"Hostname"`
	Port       int    `yaml:"Port"`
	Username   string `yaml:"Username"`
	Password   string `yaml:"Password"`
	PrivateKey string `yaml:"PrivateKey"`
}

type ServerConfig added in v1.1.0

type ServerConfig struct {
	WebServer string `yaml:"WebServer"`
	HTTPport  string `yaml:"HTTPport"`
	SSLcrt    string `yaml:"SSLcrt"`
	SSLkey    string `yaml:"SSLkey"`
	Dbhost    string `yaml:"Dbhost"`
	Dbport    string `yaml:"Dbport"`
	Dbname    string `yaml:"Dbname"`
	Dbuser    string `yaml:"Dbuser"`
	Dbpw      string `yaml:"Dbpw"`
	UseSSH    bool   `yaml:"UseSSH"`
	NoEvent   int    `yaml:"NoEvent"` //	イベント一覧に表示するイベントの数
}
var Serverconfig *ServerConfig

type T008top added in v1.2.0

type T008top struct {
	TimeNow    int64
	Totalcount int
	ErrMsg     string
	Eventlist  []srapi.Event
}

type T009Config added in v1.2.0

type T009Config struct {
	SR_acct      string //	SHOWROOMのアカウント名
	SR_pswd      string //	SHOWROOMのパスワード
	Category     string //	カテゴリー名
	Aplmin       int    //	訪問ルームリストの有効時間(分)
	Maxnoroom    int    //	訪問候補ルームリストの最大長
	Rvlfilename  string //	訪問済みルームリストファイル名
	Exclfilename string //	除外ルームリストファイル名
}

type T009top added in v1.2.0

type T009top struct {
	TimeNow      int64
	SR_acct      string //	SHOWROOMのアカウント名(必須ではない)
	Category     string //	カテゴリー名
	Aplmin       int    //	訪問ルームリストの有効時間(分)
	Maxnoroom    int    //	訪問候補ルームリストの最大長
	Rvlfilename  string //	訪問済みルームリストファイル名
	Exclfilename string //	除外ルームリストファイル名
	ErrMsg       string
	Lives        []srapi.Live //	配信中ルーム情報	(V2ではポインターとはしない)
}

type T999Dtop added in v1.1.0

type T999Dtop struct {
	TimeNow      int64
	Totalcount   int
	ErrMsg       string
	Mode         int    // 0: すべて、 1: データ取得中のものに限定
	Path         int    //	どの検索方法が使われているか?(詳細は HandlerCloesedEvnets()および関連関数を参照)
	Keywordev    string //	検索文字列:イベント名
	Keywordrm    string //	検索文字列:ルーム名
	Kwevid       string //	検索文字列:イベントID
	Userno       int    //	絞り込み対象のルームID
	Eventinflist []exsrapi.Event_Inf
	Roomlist     *[]Room
}

type Tlsnidinf

type Tlsnidinf struct {
	Norder   int
	Tlsnid   int
	Listener string
}

func SelectTlsnidList

func SelectTlsnidList(eventid string, userno int, tlsnid int, smplt time.Time) (tlsnidinflist [3]Tlsnidinf, status int)

type Top added in v1.3.0

type Top struct {
	Olim        int
	From        time.Time
	To          time.Time
	ChkGenre    map[string]bool
	TopRoomList []TopRoom
}

func SelectTopRoom added in v1.3.0

func SelectTopRoom(
	client *http.Client,
	olim int,
	fromtime time.Time,
	totime time.Time,
) (
	top *Top,
	err error,
)

type TopRoom added in v1.3.0

type TopRoom struct {
	Room_id       int
	Room_url_key  string
	Room_name     string
	Rank          int
	Genre         string
	Point         int
	Event_id      string
	Event_name    string
	Event_endtime time.Time
}

type User

type User struct {
	Userno       int
	Userlongname string
	Selected     string
}

func SelectEventuserList

func SelectEventuserList(eventid string) (userlist []User, status int)

func SelectUserList

func SelectUserList() (userlist []User, status int)

type UserInf

type UserInf struct {
	User_id   int
	User_name string
	Level     int
}

func SelectFromFluser

func SelectFromFluser(userid int) (userinflist []UserInf, status int)

Jump to

Keyboard shortcuts

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