Documentation ¶
Index ¶
- Variables
- func AdminBasicauth(env *Environment) gin.HandlerFunc
- func CallMethod(obj interface{}, methodName string, defaultValue interface{}) interface{}
- func ContainsInt(s []int, e int) bool
- func ConvertJadeToHTML(templateFilename string) (html string, err error)
- func DB(c *gin.Context) (db *gorm.DB)
- func ErrorMiddleware(layoutName string) gin.HandlerFunc
- func ExecuteTemplate(c *gin.Context, dirName string, controllerName string, layoutHTML string, ...) error
- func ExtractControllerActionName(path string, prefix string) (controllerName string, actionName string)
- func FindBySeachGAE(ctx context.Context, idx string, q string) (anyIDs []int)
- func GetDBInstance(dsn string) (db *gorm.DB)
- func GetFlashMessage(c *gin.Context) string
- func GetID(c *gin.Context) (int, error)
- func GetInt(c *gin.Context, key string) (int, error)
- func GetMethod(obj interface{}, methodName string) reflect.Value
- func GetParams(c *gin.Context, key string) string
- func GetSession(c *gin.Context, key string, defaultValue interface{}) interface{}
- func GetType(obj interface{}) string
- func HasMethod(obj interface{}, methodName string) bool
- func HashPassword(salt string, password string) string
- func Hashtag2Link(text string, href string) string
- func IntDiff(a, b []int) (ret []int)
- func IntIntersection(a, b []int) (ret []int)
- func IsDevMiddleware(isDev bool) gin.HandlerFunc
- func JoinIntSliceToString(ss []int) string
- func MapAtoi(ss []string) []int
- func MapItoA(ints []int) []string
- func MemoizeGet(key string) (value interface{}, ok bool)
- func MemoizeSet(key string, val interface{}, expire time.Duration)
- func ParseCheckbox(c *gin.Context, key string) bool
- func ParseEmailTemplateFile(fileName string, data map[string]interface{}) (subject, body string, err error)
- func QueryToSearchwords(q string) (searchWords []string)
- func RandomDigitString(length int) string
- func RandomString(length int) string
- func ReadEnvironments() (map[string]Environment, error)
- func Render(c *gin.Context, dir string, context map[string]interface{}, ...) error
- func RenderAdmmin(c *gin.Context, context map[string]interface{}, templateName ...string) error
- func RenderDirect(c *gin.Context, templateFilename string, context interface{}) error
- func RenderJade(c *gin.Context, dirName string, controllerName string, actionName string, ...) error
- func RuneCount(text string) int
- func SearchByGAEFulltext(ctx context.Context, idx string, words []string) []int
- func SendEmail(sendgridAPIKey string, from string, to string, subject string, body string) error
- func SendEmailGAE(c *gin.Context, sendgridAPIKey string, from string, tos []string, ...) error
- func SendEmailMultiTo(sendgridAPIKey string, from string, toStrings []string, subject string, ...) error
- func SetFlashMessage(c *gin.Context, value string)
- func SetSession(c *gin.Context, key string, value interface{})
- func SplitNgrams(text string, n int) []string
- func SplitNgramsRange(text string, size int) (ngrams []string)
- func SplitStringToIntSlice(s string) []int
- func UniqInt(src []int) []int
- func UniqString(src []string) []string
- func WordToSplittedWords(word string) []string
- type CalendarSupport
- type Environment
- type Fulltext
- type History
- type Pager
- type PagerLink
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EmailTemplateDir = "email_templates" EmailTemplateLineSepChar = "\n" )
View Source
var DefaultActionName = `index`
View Source
var DefaultPerPage = 15
View Source
var TemplateCaches = map[string]string{}
View Source
var TemplateDir = `templates`
View Source
var TemplateFuncMap = baseFuncMap()
View Source
var UnknownTotalCount = 1000
Functions ¶
func AdminBasicauth ¶
func AdminBasicauth(env *Environment) gin.HandlerFunc
func CallMethod ¶
func CallMethod(obj interface{}, methodName string, defaultValue interface{}) interface{}
func ContainsInt ¶
func ConvertJadeToHTML ¶
ConvertJadeToHTML は、jadeファイルを読みHTML文字列にする
func ErrorMiddleware ¶
func ErrorMiddleware(layoutName string) gin.HandlerFunc
func ExecuteTemplate ¶
func GetSession ¶
セッションから取得する
func HashPassword ¶
func Hashtag2Link ¶
func IntIntersection ¶
func IsDevMiddleware ¶
func IsDevMiddleware(isDev bool) gin.HandlerFunc
func JoinIntSliceToString ¶
func ParseEmailTemplateFile ¶
func QueryToSearchwords ¶
func RandomDigitString ¶
func RandomString ¶
func ReadEnvironments ¶
func ReadEnvironments() (map[string]Environment, error)
func RenderAdmmin ¶
func RenderDirect ¶
func RenderJade ¶
func SearchByGAEFulltext ¶
func SendEmailGAE ¶
func SendEmailMultiTo ¶
func SplitNgrams ¶
func SplitNgramsRange ¶
func SplitStringToIntSlice ¶
func UniqString ¶
func WordToSplittedWords ¶
Types ¶
type CalendarSupport ¶
func (CalendarSupport) FirstDayOfPrevMonth ¶
func (x CalendarSupport) FirstDayOfPrevMonth() time.Time
先月初日
func (CalendarSupport) PrevMonth ¶
func (x CalendarSupport) PrevMonth() string
先月の「月」の数字。例: 1月なら1、12月なら12
func (CalendarSupport) PrevYearMonth ¶
func (x CalendarSupport) PrevYearMonth() string
先月の「月」の数字。例: 2018年1月なら201801、2018年12月なら201812
func (CalendarSupport) ThisMonth ¶
func (x CalendarSupport) ThisMonth() string
先月の「月」の数字。例: 1月なら1、12月なら12
func (CalendarSupport) ThisYearMonth ¶
func (x CalendarSupport) ThisYearMonth() string
先月の「月」の数字。例: 1月なら1、12月なら12
type Environment ¶
type Environment map[string]interface{}
func (*Environment) GetString ¶
func (x *Environment) GetString(key string) string
type History ¶
type History struct { ID int Model string InstanceID int Data string CreatedAt time.Time UpdatedAt time.Time // contains filtered or unexported fields }
履歴
Click to show internal directories.
Click to hide internal directories.