model

package
v0.0.0-...-5346f80 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSecureToken

func GenerateSecureToken(length int) (string, error)

GenerateSecureToken generates random token

Types

type Authority

type Authority int32

Authority represents user's authority

const (
	// Member represents member's authority
	Member Authority = iota
	// Admin represents admin's authority
	Admin
)

type GitHubContributionCollection

type GitHubContributionCollection struct {
	UserID     UserID
	TotalCount int
	Days       []*record.GithubContributionDay
}

GitHubContributionCollection represents collection of github contribution

type ProfileScope

type ProfileScope int

ProfileScope represents scope of user's profile

const (
	// MembersOnly represents that only members can view the profile
	MembersOnly ProfileScope = iota
	// Public represents that the profile can be seen all users
	Public
	// Private represents that no one can see it(like email)
	Private
)

type Session

type Session struct {
	ID     string
	UserID UserID
}

Session represents a user session

func NewSession

func NewSession(userID UserID) (*Session, error)

NewSession returns new session

type UserID

type UserID int64

UserID represents an user id

Jump to

Keyboard shortcuts

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