data

package
v0.0.0-6 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package data contains the data model of this app

Package data contains the data model of this app

Package data contains the data model of this app

Package data contains the data model of this app

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityQueue

type ActivityQueue struct {
	ActivityQueueID int64     `json:"activityQueueId"`
	StravaUserID    int64     `json:"stravaUserId"`
	Active          bool      `json:"active"`
	CreatedDate     time.Time `json:"createdDate"`
	UpdatedDate     time.Time `json:"updatedDate"`
}

ActivityQueue is data from activity_queue table

type DBConfig

type DBConfig struct {

	// Data to connect to database
	User             string
	Pwd              string
	TCPHost          string
	InstanceConnName string
	SocketDir        string
	Port             string
	DBNameForLog     string
	DBNameForApp     string

	// Database connection pool
	Conn        *sql.DB
	Err         error
	IsAppDB     bool
	InitSuccess bool
}

DBConfig is struct for config

type EventProgress

type EventProgress struct {
	EventProgressID  int64     `json:"eventProgressId"`
	EventID          int64     `json:"eventId"`
	UserID           string    `json:"userId"`
	Active           bool      `json:"active"`
	Distance         float64   `json:"distance"`
	ElapsedTime      float64   `json:"elapsedTime"`
	ValidDistance    float64   `json:"validDistance"`
	ValidElapsedTime float64   `json:"validElapsedTime"`
	CreatedDate      time.Time `json:"createdDate"`
	UpdatedDate      time.Time `json:"updatedDate"`
}

EventProgress is data from event_progress table

type MyEvent

type MyEvent struct {
	EventRegisterID int64  `json:"eventRegisterId"`
	EventID         int64  `json:"eventId"`
	UserID          string `json:"userId"`
}

MyEvent is data from event_register table

type RefreshTokenResult

type RefreshTokenResult struct {
	UserToken    StravaUserToken
	AccessToken  string
	RefreshToken string
	TokenExpired bool
	ExpiredAt    time.Time
	ExpiredIn    int64
	Success      bool
}

RefreshTokenResult is result data after call strava refresh token

type RegisterLog

type RegisterLog struct {
	RegisterLogID int64     `json:"registerLogId"`
	UserID        string    `json:"userId"`
	EventID       int64     `json:"eventId"`
	UserInfo      string    `json:"userInfo"`
	Address       string    `json:"address"`
	Item          string    `json:"item"`
	Step          int64     `json:"step"`
	Active        bool      `json:"active"`
	CreatedDate   time.Time `json:"createdDate"`
	UpdatedDate   time.Time `json:"updatedDate"`
}

RegisterLog is data from register_log table

type ReqtData

type ReqtData struct {
	InData map[string]interface{}
}

ReqtData is data from http request

type RespData

type RespData struct {
	Code              int
	Msg               string
	Err               error
	Success           bool
	OutData           map[string]interface{}
	ForceResponseData interface{}
}

RespData is data will response to frontend

type RuleFunction

type RuleFunction struct {
	RuleID       int64     `json:"ruleId"`
	FunctionName string    `json:"functionName"`
	Description  string    `json:"description"`
	CreatedDate  time.Time `json:"createdDate"`
	UpdatedDate  time.Time `json:"updatedDate"`
}

RuleFunction is data from running_event table

type RunningEvent

type RunningEvent struct {
	EventID int64  `json:"eventId"`
	Name    string `json:"name"`
	Data    string `json:"data"`
	RuleID  int64  `json:"ruleId"`
}

RunningEvent is data from running_event table

type StravaActivityHistory

type StravaActivityHistory struct {
	UserID      string    `json:"userId"`
	History     string    `json:"history"`
	HasHistory  bool      `json:"hasHistory"`
	CreatedDate time.Time `json:"createdDate"`
	UpdatedDate time.Time `json:"updatedDate"`
}

StravaActivityHistory is data from strava_activity_history table

type StravaApp

type StravaApp struct {
	AppID           int64     `json:"appId"`
	ClientID        int64     `json:"clientId"`
	ClientSecret    string    `json:"clientSecret"`
	RefreshURL      string    `json:"refreshUrl"`
	AppName         string    `json:"appName"`
	Remark          string    `json:"remark"`
	LoadActivityURL string    `json:"loadActivityUrl"`
	CreatedDate     time.Time `json:"createdDate"`
	UpdatedDate     time.Time `json:"updatedDate"`
}

StravaApp is data from strava_app table

type StravaUserToken

type StravaUserToken struct {
	UserID         string    `json:"userId"`
	StravaUserID   int64     `json:"stravaUserId"`
	AppID          int64     `json:"appId"`
	Token          string    `json:"token"`
	RefreshToken   string    `json:"refreshToken"`
	Active         bool      `json:"active"`
	CreatedDate    time.Time `json:"createdDate"`
	UpdatedDate    time.Time `json:"updatedDate"`
	TokenExpiredAt time.Time `json:"tokenExpiredAt"`
	TokenExpiredIn int64     `json:"tokenExpiredIn"`
}

StravaUserToken is data from strava_user_token table

Jump to

Keyboard shortcuts

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