user

package
v0.0.0-...-4e1c0da Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(context *common.Context)

Check godoc

@Summary  Check if the user secret is valid
@Id       checkUserSecret
@Tags     User
@Produce  json
@Param    user_secret  query     string  true  "Secret of user"
@Success  200          {object}  common.Response[bool]
@Router   /check [get]

func Devices

func Devices(context *common.Context)

Devices

@Summary      Get user devices
@Id           getDevicesByUserSecret
@Tags         User
@Description  Delete device with device_id
@Param        user_secret  path  string  true  "Secret of user"
@Produce      json
@Success      200  {object}  common.Response[[]models.Device]
@Router       /{user_secret}/devices [get]

func GitHub

func GitHub(context *common.Context)

GitHub

@Summary  OAuth callback for GitHub, redirect to ui with user_secret
@Id       githubOAuthCallback
@Tags     User
@Success  307
@Router   /login/github [get]
@Param    state  query     string  false  "should always be 'no_need_to_set_state'"
@Param    code   query     string  true   "access code"
@Failure  400    {object}  common.BadRequestResponse
@Failure  401    {object}  common.UnauthorizedResponse

func Login

func Login(context *common.Context)

Login

@Summary  Login with GitHub
@Id       userLogin
@Tags     User
@Success  307
@Router   /login [get]

func Messages

func Messages(context *common.Context)

Messages godoc

@Summary      Get messages of user
@Id           getMessagesByUserSecret
@Tags         User
@Description  Get messages of user with pagination
@Param        user_secret  path   string  true   "Secret of user"
@Param        skip         query  int     false  "The number of records to skip"    default(0)   minimum(0)
@Param        limit        query  int     false  "The number of records to return"  default(20)  maximum(100)  minimum(0)
@Produce      json
@Success      200  {object}  common.Response[[]models.Message]
@Failure      401  {object}  common.UnauthorizedResponse
@Router       /{user_secret}/messages [get]

Types

This section is empty.

Jump to

Keyboard shortcuts

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