Documentation ¶
Index ¶
- Constants
- func GenerateDummyJWT(userID string, issuedAt time.Time) (string, error)
- func GenerateHS256JWT(userID string, issuedAt time.Time) (string, error)
- func GenerateJWT(userID string, issuedAt time.Time) (string, error)
- func GenerateJWTWithInvalidType(userID string, issuedAt time.Time) (string, error)
- func GenerateJWTWithNoData(issuedAt time.Time) (string, error)
- func GenerateTamperedJWT(userID1 string, userID2 string, issuedAt time.Time) (string, error)
- type AuthResponse
- type GetGraphRequest
- type GetIsuConditionRequest
- type GetIsuConditionResponse
- type GetIsuConditionResponseArray
- type GetMeResponse
- type GetTrendResponse
- type GetTrendResponseOne
- type GraphData
- type GraphDataPercentage
- type GraphResponse
- type GraphResponseOne
- type InitializeResponse
- type Isu
- type JIAServiceRequest
- type PostInitializeRequest
- type PostIsuConditionRequest
- type PostIsuRequest
- type SignoutResponse
- type TrendCondition
- type TrendConditions
Constants ¶
View Source
const (
ConditionLimit = 20 //GET /api/condition/:jia_isu_uuid
)
backend側で勝手にとるlimit
Variables ¶
This section is empty.
Functions ¶
func GenerateDummyJWT ¶
異なる秘密鍵でJWTを生成する
func GenerateHS256JWT ¶
異なる暗号方式でJWTを生成する
func GenerateJWT ¶
認証に利用する JWT トークンを生成して返す。
func GenerateJWTWithInvalidType ¶
jia_user_idの型がstringでないJWTを生成する
func GenerateJWTWithNoData ¶
jia_user_idの無いJWTを生成する
Types ¶
type AuthResponse ¶
type AuthResponse struct { }
type GetGraphRequest ¶
type GetGraphRequest struct {
Date int64 // unixtime
}
type GetIsuConditionRequest ¶
type GetIsuConditionResponse ¶
type GetIsuConditionResponse struct { JIAIsuUUID string `json:"jia_isu_uuid"` IsuName string `json:"isu_name"` Timestamp int64 `json:"timestamp"` IsSitting bool `json:"is_sitting"` Condition string `json:"condition"` ConditionLevel string `json:"condition_level"` Message string `json:"message"` }
func (*GetIsuConditionResponse) NKeys ¶
func (c *GetIsuConditionResponse) NKeys() int
func (*GetIsuConditionResponse) UnmarshalJSONObject ¶
func (c *GetIsuConditionResponse) UnmarshalJSONObject(dec *gojay.Decoder, key string) error
type GetIsuConditionResponseArray ¶
type GetIsuConditionResponseArray []GetIsuConditionResponse
func (*GetIsuConditionResponseArray) UnmarshalJSONArray ¶
func (c *GetIsuConditionResponseArray) UnmarshalJSONArray(dec *gojay.Decoder) error
type GetMeResponse ¶
type GetMeResponse struct {
JIAUserID string `json:"jia_user_id"`
}
type GetTrendResponse ¶
type GetTrendResponse []GetTrendResponseOne
func (*GetTrendResponse) UnmarshalJSONArray ¶
func (t *GetTrendResponse) UnmarshalJSONArray(dec *gojay.Decoder) error
type GetTrendResponseOne ¶
type GetTrendResponseOne struct { Character string `json:"character"` Info TrendConditions `json:"info"` Warning TrendConditions `json:"warning"` Critical TrendConditions `json:"critical"` }
func (*GetTrendResponseOne) NKeys ¶
func (t *GetTrendResponseOne) NKeys() int
func (*GetTrendResponseOne) UnmarshalJSONObject ¶
func (t *GetTrendResponseOne) UnmarshalJSONObject(dec *gojay.Decoder, key string) error
type GraphData ¶
type GraphData struct { Score int `json:"score"` Percentage GraphDataPercentage `json:"percentage"` }
type GraphDataPercentage ¶
type GraphResponse ¶
type GraphResponse []*GraphResponseOne
type GraphResponseOne ¶
type InitializeResponse ¶
type InitializeResponse struct {
Language string `json:"language"`
}
type JIAServiceRequest ¶
type PostInitializeRequest ¶
type PostInitializeRequest struct {
JIAServiceURL string `json:"jia_service_url"`
}
type PostIsuConditionRequest ¶
type PostIsuRequest ¶
type SignoutResponse ¶
type SignoutResponse struct { }
type TrendCondition ¶
func (*TrendCondition) NKeys ¶
func (t *TrendCondition) NKeys() int
func (*TrendCondition) UnmarshalJSONObject ¶
func (t *TrendCondition) UnmarshalJSONObject(dec *gojay.Decoder, key string) error
type TrendConditions ¶
type TrendConditions []TrendCondition
func (*TrendConditions) UnmarshalJSONArray ¶
func (t *TrendConditions) UnmarshalJSONArray(dec *gojay.Decoder) error
Click to show internal directories.
Click to hide internal directories.