Help us shape the future of Go! Take the 2026 Go Developer Survey

user

package
v3.1.61 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT, MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEmail

func AddEmail(ctx *context.APIContext)

AddEmail add an email address

func BlockUser

func BlockUser(ctx *context.APIContext)

func CheckFollowing

func CheckFollowing(ctx *context.APIContext)

CheckFollowing check if one user is following another user

func CheckMyFollowing

func CheckMyFollowing(ctx *context.APIContext)

CheckMyFollowing whether the given user is followed by the authenticated user

func CheckUserBlock

func CheckUserBlock(ctx *context.APIContext)

func CreateAccessToken

func CreateAccessToken(ctx *context.APIContext)

CreateAccessToken create access tokens

func CreateGPGKey

func CreateGPGKey(ctx *context.APIContext)

CreateGPGKey create a GPG key belonging to the authenticated user

func CreateHook

func CreateHook(ctx *context.APIContext)

CreateHook create a hook for the authenticated user

func CreateOauth2Application

func CreateOauth2Application(ctx *context.APIContext)

CreateOauth2Application is the handler to create a new OAuth2 Application for the authenticated user

func CreateOrUpdateSecret

func CreateOrUpdateSecret(ctx *context.APIContext)

create or update one secret of the user scope

func CreatePublicKey

func CreatePublicKey(ctx *context.APIContext)

CreatePublicKey create one public key for me

func CreateRegistrationToken

func CreateRegistrationToken(ctx *context.APIContext)

CreateRegistrationToken returns the token to register user runners

func CreateUserGPGKey

func CreateUserGPGKey(ctx *context.APIContext, form api.CreateGPGKeyOption, uid int64)

CreateUserGPGKey creates new GPG key to given user by ID.

func CreateUserPublicKey

func CreateUserPublicKey(ctx *context.APIContext, form api.CreateKeyOption, uid int64)

CreateUserPublicKey creates new public key to given user by ID.

func CreateVariable

func CreateVariable(ctx *context.APIContext)

CreateVariable create a user-level variable

func DeleteAccessToken

func DeleteAccessToken(ctx *context.APIContext)

DeleteAccessToken delete access tokens

func DeleteAvatar

func DeleteAvatar(ctx *context.APIContext)

DeleteAvatar deletes the Avatar of an User

func DeleteEmail

func DeleteEmail(ctx *context.APIContext)

DeleteEmail delete email

func DeleteGPGKey

func DeleteGPGKey(ctx *context.APIContext)

DeleteGPGKey remove a GPG key belonging to the authenticated user

func DeleteHook

func DeleteHook(ctx *context.APIContext)

DeleteHook delete a hook of the authenticated user

func DeleteOauth2Application

func DeleteOauth2Application(ctx *context.APIContext)

DeleteOauth2Application delete OAuth2 Application

func DeletePublicKey

func DeletePublicKey(ctx *context.APIContext)

DeletePublicKey delete one public key

func DeleteRunner

func DeleteRunner(ctx *context.APIContext)

DeleteRunner delete an user-level runner

func DeleteSecret

func DeleteSecret(ctx *context.APIContext)

DeleteSecret delete one secret of the user scope

func DeleteVariable

func DeleteVariable(ctx *context.APIContext)

DeleteVariable delete a user-level variable which is created by current doer

func EditHook

func EditHook(ctx *context.APIContext)

EditHook modify a hook of the authenticated user

func Follow

func Follow(ctx *context.APIContext)

Follow follow a user

func GetAuthenticatedUser

func GetAuthenticatedUser(ctx *context.APIContext)

GetAuthenticatedUser get current user's information

func GetContextUserByPathParam

func GetContextUserByPathParam(ctx *context.APIContext) *user_model.User

GetContextUserByPathParam returns user whose name is presented in URL (path param "username").

func GetGPGKey

func GetGPGKey(ctx *context.APIContext)

GetGPGKey get the GPG key based on a id

func GetHook

func GetHook(ctx *context.APIContext)

GetHook get the authenticated user's hook by id

func GetInfo

func GetInfo(ctx *context.APIContext)

GetInfo get user's information

func GetMyStarredRepos

func GetMyStarredRepos(ctx *context.APIContext)

GetMyStarredRepos returns the repos that the authenticated user has starred

func GetMyWatchedRepos

func GetMyWatchedRepos(ctx *context.APIContext)

GetMyWatchedRepos returns the repos that the authenticated user is watching

func GetOauth2Application

func GetOauth2Application(ctx *context.APIContext)

GetOauth2Application get OAuth2 Application

func GetPublicKey

func GetPublicKey(ctx *context.APIContext)

GetPublicKey get a public key

func GetRegistrationToken

func GetRegistrationToken(ctx *context.APIContext)

GetRegistrationToken returns the token to register user runners

func GetRunner

func GetRunner(ctx *context.APIContext)

GetRunner get an user-level runner

func GetStarredRepos

func GetStarredRepos(ctx *context.APIContext)

GetStarredRepos returns the repos that the given user has starred

func GetUserByPathParam

func GetUserByPathParam(ctx *context.APIContext, name string) *user_model.User

GetUserByPathParam get user by the path param name it will redirect to the user's new name if the user's name has been changed

func GetUserHeatmapData

func GetUserHeatmapData(ctx *context.APIContext)

GetUserHeatmapData is the handler to get a users heatmap

func GetUserSettings

func GetUserSettings(ctx *context.APIContext)

GetUserSettings returns user settings

func GetVariable

func GetVariable(ctx *context.APIContext)

GetVariable get a user-level variable which is created by current doer

func GetVerificationToken

func GetVerificationToken(ctx *context.APIContext)

GetVerificationToken returns the current token to be signed for this user

func GetWatchedRepos

func GetWatchedRepos(ctx *context.APIContext)

GetWatchedRepos returns the repos that the user specified in ctx is watching

func HandleAddGPGKeyError

func HandleAddGPGKeyError(ctx *context.APIContext, err error, token string)

HandleAddGPGKeyError handle add GPGKey error

func IsStarring

func IsStarring(ctx *context.APIContext)

IsStarring returns whether the authenticated is starring the repo

func IsWatching

func IsWatching(ctx *context.APIContext)

IsWatching returns whether the authenticated user is watching the repo specified in ctx

func ListAccessTokens

func ListAccessTokens(ctx *context.APIContext)

ListAccessTokens list all the access tokens

func ListBlocks

func ListBlocks(ctx *context.APIContext)

func ListEmails

func ListEmails(ctx *context.APIContext)

ListEmails list all of the authenticated user's email addresses see https://github.com/gogits/go-gogs-client/wiki/Users-Emails#list-email-addresses-for-a-user

func ListFollowers

func ListFollowers(ctx *context.APIContext)

ListFollowers list the given user's followers

func ListFollowing

func ListFollowing(ctx *context.APIContext)

ListFollowing list the users that the given user is following

func ListGPGKeys

func ListGPGKeys(ctx *context.APIContext)

ListGPGKeys get the GPG key list of a user

func ListHooks

func ListHooks(ctx *context.APIContext)

ListHooks list the authenticated user's webhooks

func ListMyFollowers

func ListMyFollowers(ctx *context.APIContext)

ListMyFollowers list the authenticated user's followers

func ListMyFollowing

func ListMyFollowing(ctx *context.APIContext)

ListMyFollowing list the users that the authenticated user is following

func ListMyGPGKeys

func ListMyGPGKeys(ctx *context.APIContext)

ListMyGPGKeys get the GPG key list of the authenticated user

func ListMyPublicKeys

func ListMyPublicKeys(ctx *context.APIContext)

ListMyPublicKeys list all of the authenticated user's public keys

func ListMyRepos

func ListMyRepos(ctx *context.APIContext)

ListMyRepos - list the repositories you own or have access to.

func ListOauth2Applications

func ListOauth2Applications(ctx *context.APIContext)

ListOauth2Applications list all the Oauth2 application

func ListOrgRepos

func ListOrgRepos(ctx *context.APIContext)

ListOrgRepos - list the repositories of an organization.

func ListPublicKeys

func ListPublicKeys(ctx *context.APIContext)

ListPublicKeys list the given user's public keys

func ListRunners

func ListRunners(ctx *context.APIContext)

ListRunners get user-level runners

func ListUserActivityFeeds

func ListUserActivityFeeds(ctx *context.APIContext)

func ListUserRepos

func ListUserRepos(ctx *context.APIContext)

ListUserRepos - list the repos owned by the given user.

func ListVariables

func ListVariables(ctx *context.APIContext)

ListVariables list user-level variables

func ListWorkflowJobs

func ListWorkflowJobs(ctx *context.APIContext)

ListWorkflowJobs lists workflow jobs

func ListWorkflowRuns

func ListWorkflowRuns(ctx *context.APIContext)

ListWorkflowRuns lists workflow runs

func Search(ctx *context.APIContext)

Search search users

func Star

func Star(ctx *context.APIContext)

Star the repo specified in the APIContext, as the authenticated user

func UnblockUser

func UnblockUser(ctx *context.APIContext)

func Unfollow

func Unfollow(ctx *context.APIContext)

Unfollow unfollow a user

func Unstar

func Unstar(ctx *context.APIContext)

Unstar the repo specified in the APIContext, as the authenticated user

func Unwatch

func Unwatch(ctx *context.APIContext)

Unwatch the repo specified in ctx, as the authenticated user

func UpdateAvatar

func UpdateAvatar(ctx *context.APIContext)

UpdateAvatar updates the Avatar of an User

func UpdateOauth2Application

func UpdateOauth2Application(ctx *context.APIContext)

UpdateOauth2Application update OAuth2 Application

func UpdateUserSettings

func UpdateUserSettings(ctx *context.APIContext)

UpdateUserSettings returns user settings

func UpdateVariable

func UpdateVariable(ctx *context.APIContext)

UpdateVariable update a user-level variable which is created by current doer

func VerifyUserGPGKey

func VerifyUserGPGKey(ctx *context.APIContext)

VerifyUserGPGKey creates new GPG key to given user by ID.

func Watch

func Watch(ctx *context.APIContext)

Watch the repo specified in ctx, as the authenticated user

Types

This section is empty.

Source Files

  • action.go
  • app.go
  • avatar.go
  • block.go
  • email.go
  • follower.go
  • gpg_key.go
  • helper.go
  • hook.go
  • key.go
  • repo.go
  • runners.go
  • settings.go
  • star.go
  • user.go
  • watch.go

Jump to

Keyboard shortcuts

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