feat: init repo

This commit is contained in:
Rogee
2025-01-09 19:11:01 +08:00
parent b9cc63fe8a
commit 1c7b603769
149 changed files with 20066 additions and 10 deletions

View File

@@ -0,0 +1,38 @@
package storage
import (
"git.ipao.vip/rogeecn/atom/container"
"git.ipao.vip/rogeecn/atom/utils/opt"
)
const DefaultPrefix = "Storage"
func DefaultProvider() container.ProviderContainer {
return container.ProviderContainer{
Provider: Provide,
Options: []opt.Option{
opt.Prefix(DefaultPrefix),
},
}
}
type Config struct {
Path string
Asset string
tmpStore map[string]string
}
func (c *Config) AddTmpStore(key, value string) {
c.tmpStore[key] = value
}
func (c *Config) GetTmpStore(key string) string {
return c.tmpStore[key]
}
// HasTmpStore check if key exists in tmpStore
func (c *Config) HasTmpStore(key string) bool {
_, ok := c.tmpStore[key]
return ok
}