httpstore

package
v0.0.0-...-ce03e45 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package httpstore is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache(opt *option.Option) *Cache

func (*Cache) CreateSession

func (c *Cache) CreateSession(ctx context.Context, uid typedef.UserID) (typedef.SessionID, error)

func (*Cache) ReadAuthorizationRequestFingerprint

func (c *Cache) ReadAuthorizationRequestFingerprint(ctx context.Context, clientID typedef.ClientID, authCode string) (*typedef.AuthorizationRequestFingerprint, error)

func (*Cache) ReadRefreshToken

func (c *Cache) ReadRefreshToken(ctx context.Context, clientID typedef.ClientID, userID typedef.UserID) (jwt.Token, error)

func (*Cache) Restore

func (c *Cache) Restore(r *http.Request, sid typedef.SessionID) (*http.Request, error)

func (*Cache) WriteAuthorizationRequestFingerprint

func (c *Cache) WriteAuthorizationRequestFingerprint(ctx context.Context, clientID typedef.ClientID, authCode string, param *typedef.AuthorizationRequestFingerprint) error

func (*Cache) WriteRefreshToken

func (c *Cache) WriteRefreshToken(ctx context.Context, token string, clientID typedef.ClientID, userID typedef.UserID) error

type CacheHashAllReader

type CacheHashAllReader interface {
	ReadHashAll(ctx context.Context, key string) (map[string]string, error)
}

type CacheHashReader

type CacheHashReader interface {
	ReadHash(ctx context.Context, key string, field string) (string, error)
}

type CacheHashWriter

type CacheHashWriter interface {
	WriteHash(ctx context.Context, key string, values map[string]any, ttl time.Duration) error
}

type CacheReader

type CacheReader interface {
	Read(ctx context.Context, key string) (string, error)
}

type CacheWriter

type CacheWriter interface {
	Write(ctx context.Context, key string, value any, ttl time.Duration) error
}

type Context

type Context struct{}

func (*Context) Read

func (c *Context) Read(ctx context.Context, key any) any

func (*Context) Write

func (c *Context) Write(ctx context.Context, key any, val any) context.Context
type Cookie struct {
	// contains filtered or unexported fields
}

func NewCookie

func NewCookie(hashKey, blockKey []byte, clock iface.Clocker) *Cookie

func (*Cookie) Read

func (c *Cookie) Read(r *http.Request, name string) (string, error)

func (*Cookie) Write

func (c *Cookie) Write(w http.ResponseWriter, name, val string, ttl time.Duration) error

type MockCacheHashAllReader

type MockCacheHashAllReader struct {
	// contains filtered or unexported fields
}

MockCacheHashAllReader is a mock of CacheHashAllReader interface.

func NewMockCacheHashAllReader

func NewMockCacheHashAllReader(ctrl *gomock.Controller) *MockCacheHashAllReader

NewMockCacheHashAllReader creates a new mock instance.

func (*MockCacheHashAllReader) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCacheHashAllReader) ReadHashAll

func (m *MockCacheHashAllReader) ReadHashAll(ctx context.Context, key string) (map[string]string, error)

ReadHashAll mocks base method.

type MockCacheHashAllReaderMockRecorder

type MockCacheHashAllReaderMockRecorder struct {
	// contains filtered or unexported fields
}

MockCacheHashAllReaderMockRecorder is the mock recorder for MockCacheHashAllReader.

func (*MockCacheHashAllReaderMockRecorder) ReadHashAll

func (mr *MockCacheHashAllReaderMockRecorder) ReadHashAll(ctx, key any) *gomock.Call

ReadHashAll indicates an expected call of ReadHashAll.

type MockCacheHashReader

type MockCacheHashReader struct {
	// contains filtered or unexported fields
}

MockCacheHashReader is a mock of CacheHashReader interface.

func NewMockCacheHashReader

func NewMockCacheHashReader(ctrl *gomock.Controller) *MockCacheHashReader

NewMockCacheHashReader creates a new mock instance.

func (*MockCacheHashReader) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCacheHashReader) ReadHash

func (m *MockCacheHashReader) ReadHash(ctx context.Context, key, field string) (string, error)

ReadHash mocks base method.

type MockCacheHashReaderMockRecorder

type MockCacheHashReaderMockRecorder struct {
	// contains filtered or unexported fields
}

MockCacheHashReaderMockRecorder is the mock recorder for MockCacheHashReader.

func (*MockCacheHashReaderMockRecorder) ReadHash

func (mr *MockCacheHashReaderMockRecorder) ReadHash(ctx, key, field any) *gomock.Call

ReadHash indicates an expected call of ReadHash.

type MockCacheHashWriter

type MockCacheHashWriter struct {
	// contains filtered or unexported fields
}

MockCacheHashWriter is a mock of CacheHashWriter interface.

func NewMockCacheHashWriter

func NewMockCacheHashWriter(ctrl *gomock.Controller) *MockCacheHashWriter

NewMockCacheHashWriter creates a new mock instance.

func (*MockCacheHashWriter) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCacheHashWriter) WriteHash

func (m *MockCacheHashWriter) WriteHash(ctx context.Context, key string, values map[string]any, ttl time.Duration) error

WriteHash mocks base method.

type MockCacheHashWriterMockRecorder

type MockCacheHashWriterMockRecorder struct {
	// contains filtered or unexported fields
}

MockCacheHashWriterMockRecorder is the mock recorder for MockCacheHashWriter.

func (*MockCacheHashWriterMockRecorder) WriteHash

func (mr *MockCacheHashWriterMockRecorder) WriteHash(ctx, key, values, ttl any) *gomock.Call

WriteHash indicates an expected call of WriteHash.

type MockCacheReadWriter

type MockCacheReadWriter struct {
	// contains filtered or unexported fields
}

MockCacheReadWriter is a mock of CacheReadWriter interface.

func NewMockCacheReadWriter

func NewMockCacheReadWriter(ctrl *gomock.Controller) *MockCacheReadWriter

NewMockCacheReadWriter creates a new mock instance.

func (*MockCacheReadWriter) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCacheReadWriter) Read

func (m *MockCacheReadWriter) Read(ctx context.Context, key string) (string, error)

Read mocks base method.

func (*MockCacheReadWriter) ReadHash

func (m *MockCacheReadWriter) ReadHash(ctx context.Context, key, field string) (string, error)

ReadHash mocks base method.

func (*MockCacheReadWriter) ReadHashAll

func (m *MockCacheReadWriter) ReadHashAll(ctx context.Context, key string) (map[string]string, error)

ReadHashAll mocks base method.

func (*MockCacheReadWriter) Write

func (m *MockCacheReadWriter) Write(ctx context.Context, key string, value any, ttl time.Duration) error

Write mocks base method.

func (*MockCacheReadWriter) WriteHash

func (m *MockCacheReadWriter) WriteHash(ctx context.Context, key string, values map[string]any, ttl time.Duration) error

WriteHash mocks base method.

type MockCacheReadWriterMockRecorder

type MockCacheReadWriterMockRecorder struct {
	// contains filtered or unexported fields
}

MockCacheReadWriterMockRecorder is the mock recorder for MockCacheReadWriter.

func (*MockCacheReadWriterMockRecorder) Read

func (mr *MockCacheReadWriterMockRecorder) Read(ctx, key any) *gomock.Call

Read indicates an expected call of Read.

func (*MockCacheReadWriterMockRecorder) ReadHash

func (mr *MockCacheReadWriterMockRecorder) ReadHash(ctx, key, field any) *gomock.Call

ReadHash indicates an expected call of ReadHash.

func (*MockCacheReadWriterMockRecorder) ReadHashAll

func (mr *MockCacheReadWriterMockRecorder) ReadHashAll(ctx, key any) *gomock.Call

ReadHashAll indicates an expected call of ReadHashAll.

func (*MockCacheReadWriterMockRecorder) Write

func (mr *MockCacheReadWriterMockRecorder) Write(ctx, key, value, ttl any) *gomock.Call

Write indicates an expected call of Write.

func (*MockCacheReadWriterMockRecorder) WriteHash

func (mr *MockCacheReadWriterMockRecorder) WriteHash(ctx, key, values, ttl any) *gomock.Call

WriteHash indicates an expected call of WriteHash.

type MockCacheReader

type MockCacheReader struct {
	// contains filtered or unexported fields
}

MockCacheReader is a mock of CacheReader interface.

func NewMockCacheReader

func NewMockCacheReader(ctrl *gomock.Controller) *MockCacheReader

NewMockCacheReader creates a new mock instance.

func (*MockCacheReader) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCacheReader) Read

func (m *MockCacheReader) Read(ctx context.Context, key string) (string, error)

Read mocks base method.

type MockCacheReaderMockRecorder

type MockCacheReaderMockRecorder struct {
	// contains filtered or unexported fields
}

MockCacheReaderMockRecorder is the mock recorder for MockCacheReader.

func (*MockCacheReaderMockRecorder) Read

func (mr *MockCacheReaderMockRecorder) Read(ctx, key any) *gomock.Call

Read indicates an expected call of Read.

type MockCacheWriter

type MockCacheWriter struct {
	// contains filtered or unexported fields
}

MockCacheWriter is a mock of CacheWriter interface.

func NewMockCacheWriter

func NewMockCacheWriter(ctrl *gomock.Controller) *MockCacheWriter

NewMockCacheWriter creates a new mock instance.

func (*MockCacheWriter) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCacheWriter) Write

func (m *MockCacheWriter) Write(ctx context.Context, key string, value any, ttl time.Duration) error

Write mocks base method.

type MockCacheWriterMockRecorder

type MockCacheWriterMockRecorder struct {
	// contains filtered or unexported fields
}

MockCacheWriterMockRecorder is the mock recorder for MockCacheWriter.

func (*MockCacheWriterMockRecorder) Write

func (mr *MockCacheWriterMockRecorder) Write(ctx, key, value, ttl any) *gomock.Call

Write indicates an expected call of Write.

type Session

type Session struct {
	ID       typedef.SessionID
	UserID   typedef.UserID
	AuthTime time.Time
}

type SessionKey

type SessionKey struct{}

Jump to

Keyboard shortcuts

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