defs

package
v0.0.0-...-fdd12db Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: MIT Imports: 0 Imported by: 3

Documentation

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

type Comment struct {
	Id      string
	VideoId string
	Author  string
	Content string
}

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

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

response

type SimpleSession

type SimpleSession struct {
	Username string //login name
	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