You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

store.go 465B

12345678910111213141516
  1. // Copyright 2021 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package models
  5. import "github.com/lafriks/xormstore"
  6. // CreateStore creates a xormstore for the provided table and key
  7. func CreateStore(table, key string) (*xormstore.Store, error) {
  8. store, err := xormstore.NewOptions(x, xormstore.Options{
  9. TableName: table,
  10. }, []byte(key))
  11. return store, err
  12. }