cachefile

package
v1.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheFile

type CacheFile struct {
	DB *bbolt.DB
}

CacheFile store and update the cache file

func Cache

func Cache() *CacheFile

Cache return singleton of CacheFile

func (*CacheFile) Close

func (c *CacheFile) Close() error

func (*CacheFile) FakeIpStore added in v1.18.9

func (c *CacheFile) FakeIpStore() *FakeIpStore

func (*CacheFile) GetETagWithHash added in v1.18.9

func (c *CacheFile) GetETagWithHash(key string) (etagWithHash EtagWithHash)

func (*CacheFile) GetSubscriptionInfo added in v1.18.10

func (c *CacheFile) GetSubscriptionInfo(name string) (userInfo string)

func (*CacheFile) SelectedMap

func (c *CacheFile) SelectedMap() map[string]string

func (*CacheFile) SetETagWithHash added in v1.18.9

func (c *CacheFile) SetETagWithHash(url string, etagWithHash EtagWithHash)

func (*CacheFile) SetSelected

func (c *CacheFile) SetSelected(group, selected string)

func (*CacheFile) SetSubscriptionInfo added in v1.18.10

func (c *CacheFile) SetSubscriptionInfo(name string, userInfo string)

type EtagWithHash added in v1.18.9

type EtagWithHash struct {
	Hash utils.HashType
	ETag string
	Time time.Time
}

type FakeIpStore added in v1.18.9

type FakeIpStore struct {
	*CacheFile
}

func (*FakeIpStore) DelByIP added in v1.18.9

func (c *FakeIpStore) DelByIP(ip netip.Addr)

func (*FakeIpStore) FlushFakeIP added in v1.18.9

func (c *FakeIpStore) FlushFakeIP() error

func (*FakeIpStore) GetByHost added in v1.18.9

func (c *FakeIpStore) GetByHost(host string) (ip netip.Addr, exist bool)

func (*FakeIpStore) GetByIP added in v1.18.9

func (c *FakeIpStore) GetByIP(ip netip.Addr) (host string, exist bool)

func (*FakeIpStore) PutByHost added in v1.18.9

func (c *FakeIpStore) PutByHost(host string, ip netip.Addr)

func (*FakeIpStore) PutByIP added in v1.18.9

func (c *FakeIpStore) PutByIP(ip netip.Addr, host string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL