You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: store.go
    path of file: ./repos/gaia/store
    
    the code of the file until where you have to start completion: package store

import (
	"encoding/binary"
	"fmt"
	"path/filepath"
	"time"

	"github.com/casbin/casbin/v2/persist"
	"github.com/speza/casbin-bolt-adapter"
	bolt "go.etcd.io/bbolt"

	"github.com/gaia-pipeline/gaia"
	"github.com/gaia-pipeline/gaia/helper/assethelper"
	"github.com/gaia-pipeline/gaia/security"
)

var (
	// Name of the bucket where we store user objects
	userBucket = []byte("Users")

	// Where we store all users permissions
	userPermsBucket = []byte("UserPermissions")

	// Name of the bucket where we store information about pipelines
	pipelineBucket = []byte("Pipelines")

	// Name of the bucket where we store information about pipelines
	// which are not yet compiled (create pipeline)
	createPipelineBucket = []byte("CreatePipelines")

	// Name of the bucket where we s
    
func (s *BoltStore) setupDatabase() error {
	// Create bucket if not exists function
	setP := &setup{
		bs:  s,
		err: nil,
	}

	// Make sure buckets exist
	setP.update(userBucket)
	setP.update(userPermsBucket)
	setP.update(pipelineBucket)
	setP.update(createPipelineBucket)
	setP.update(pipelineRunBucket)
	setP.update(settingsBucket)
	setP.update(workerBucket)
	setP.update(shaPairBucket)

	if setP.err != nil {
		return setP.err
	}

	// Make sure that the user "admin" does exist
	admin, err := s.UserGet(adminUsername)
	if err != nil {
		return err
	}

	// Create admin user if we cannot find it
	if admin == nil {
		err = s.UserPut(&gaia.User{
			DisplayName: adminUsername,
			Username:    adminUsername,
			Password:    adminPassword,
		}, true)

		if err != nil {
			return err
		}
	}

	err = s.CreatePermissionsIfNotExisting()
	if err != nil {
		return err
	}

	u, err := s.UserGet(autoUsername)
	if err != nil {
		return err
	}

	if u == nil {
		triggerToken := security.GenerateRandomUUIDV5()
		auto := gaia.User{
			DisplayName:  "Auto User",
			JwtExpiry:    0,
			Password:     autoPassword,
			Tokenstring:  "",
			TriggerToken: triggerToken,
			Username:     autoUsername,
			LastLogin:    time.Now(),
		}
		err = s.UserPut(&auto, true)
		if err != nil {
			return err
		}
	}

	return nil
}