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 466B

123456789101112131415161718
  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 db
  5. import (
  6. "github.com/lafriks/xormstore"
  7. )
  8. // CreateStore creates a xormstore for the provided table and key
  9. func CreateStore(table, key string) (*xormstore.Store, error) {
  10. store, err := xormstore.NewOptions(x, xormstore.Options{
  11. TableName: table,
  12. }, []byte(key))
  13. return store, err
  14. }