consts

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SessionCookieName     = "cp_sess"
	AuthCSRFCookieName    = "cp_auth_csrf"
	RedirectURLCookieName = "cp_redirect"
	SessionKey            = "auth_state"
	CookiePath            = "/"
	CookieHttpOnly        = true
	CookieSessionMaxAge   = 60 * 60 * 24 * 7
	CookieCSRFMaxAge      = 60 * 15
	SessionUserEmail      = "sess_user_email"
	SessionUserUUID       = "sess_user_uuid"
	SessionUserName       = "sess_user_name"
	SessionUserRole       = "sess_user_role"
	IsRestricted          = "is_restricted"
	ClubSlugKeyName       = "club_slug_key"
	UserUUIDKeyName       = "user_uuid_key"
	ImageIDKeyName        = "image_id_key"
	ClubUUIDKeyName       = "club_uuid_key"
	ThumbnailIDKeyName    = "thumbnail_id_key"
)
View Source
const DefaultThumbnailPath = "thumbnails/default.png"

DefaultThumbnailPath デフォルトのサムネイル画像のパス

View Source
const DummyUUID = "aaaaaaaa-aaaa-4aaa-aaaa-aaaaaaaaaaaa"

DummyUUID ダミーのUUID

View Source
const UploadSize = 2 << 18 // 2MiB

UploadSize アップロード可能なファイルの最大サイズ (2MiB)

Variables

View Source
var ErrUnreachable = errors.New("unreachable")
View Source
var JST = time.FixedZone("Asia/Tokyo", 9*60*60)

Functions

This section is empty.

Types

type CampusType

type CampusType uint8

CampusType サークルのキャンパスタイプ (0: 八王子, 1: 蒲田)

const (
	CampusHachioji CampusType = 0
	CampusKamata   CampusType = 1
)

func (CampusType) ToPrimitive

func (ct CampusType) ToPrimitive() uint8

ToPrimitive CampusType を uint8 に変換

type ClubType

type ClubType uint8

ClubType サークルの種類 (0: 体育会系, 1: 文化会系, 2: 実行委員会)

const (
	SportsType  ClubType = 0
	CultureType ClubType = 1
	KokasaiType ClubType = 2
)

func (ClubType) ToPrimitive

func (ct ClubType) ToPrimitive() uint8

ToPrimitive ClubType を uint8 に変換

type UserType

type UserType string

UserType ユーザの種類 (domain: 学内ユーザ, general: 一般ユーザ, admin: 管理者)

const (
	DomainUser  UserType = "domain"
	GeneralUser UserType = "general"
	AdminUser   UserType = "admin"
)

func (UserType) ToPrimitive

func (ut UserType) ToPrimitive() string

ToPrimitive UserType を string に変換

type ValidateError

type ValidateError struct {
	// contains filtered or unexported fields
}

func NewValidateError

func NewValidateError(text string) *ValidateError

func (*ValidateError) Error

func (err *ValidateError) Error() string

Jump to

Keyboard shortcuts

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