defs

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: MulanPSL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

* @Descripttion: * @version: * @Author: congsir * @Date: 2022-01-04 22:27:47 * @LastEditors: Please set LastEditors * @LastEditTime: 2022-01-09 11:48:41

* @Descripttion: * @version: * @Author: congsir * @Date: 2022-01-04 22:28:10 * @LastEditors: Please set LastEditors * @LastEditTime: 2022-01-04 22:28:11

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorRequestBodyParseFailed = ErrResponse{HttpSC: 400, Error: Err{Error: "Request body is not correct", ErrorCode: "001"}}
	ErrorNotAuthUser            = ErrResponse{HttpSC: 401, Error: Err{Error: "User authentication failed.", ErrorCode: "002"}}
	ErrorDBError                = ErrResponse{HttpSC: 500, Error: Err{Error: "DB ops failed", ErrorCode: "003"}}
	ErrorInternalFaults         = ErrResponse{HttpSC: 500, Error: Err{Error: "Internal service error", ErrorCode: "004"}}
)

Functions

This section is empty.

Types

type Comment added in v0.0.4

type Comment struct {
	Id      string `json:"id"`
	VideoId string `json:"video_id"`
	Author  string `json:"author"`
	Content string `json:"content"`
}

type Err

type Err struct {
	Error     string `json:"error"`
	ErrorCode string `json:"error_code"`
}

type ErrResponse

type ErrResponse struct {
	HttpSC int
	Error  Err
}

type SignedUp added in v0.0.4

type SignedUp struct {
	Success   bool   `json:"success"`
	SessionId string `json:"session_id"`
}

response

type SimpleSession added in v0.0.4

type SimpleSession struct {
	Username string
	TTL      int64
}

type UserCredential

type UserCredential struct {
	Username string `json:"user_name"`
	Pwd      string `json:"pwd"`
}

reqeusts

type VideoInfo

type VideoInfo struct {
	Id           string
	AuthorId     int
	Name         string
	DisplayCtime string
}

Data model

Jump to

Keyboard shortcuts

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