Documentation
¶
Overview ¶
Package phpsessgo is a generated GoMock package.
Index ¶
- Constants
- func Read(sessionID string) (data string, err error)
- func Write(sessionID string, sessionData string) error
- type MockSessionManager
- func (m *MockSessionManager) EXPECT() *MockSessionManagerMockRecorder
- func (m *MockSessionManager) Encoder() SessionEncoder
- func (m *MockSessionManager) SIDCreator() SessionIDCreator
- func (m *MockSessionManager) Save(session *Session) error
- func (m *MockSessionManager) SessionName() string
- func (m *MockSessionManager) SetCookieString(arg0 string) string
- func (m *MockSessionManager) Start(w http.ResponseWriter, r *http.Request) (*Session, error)
- type MockSessionManagerMockRecorder
- func (mr *MockSessionManagerMockRecorder) Encoder() *gomock.Call
- func (mr *MockSessionManagerMockRecorder) SIDCreator() *gomock.Call
- func (mr *MockSessionManagerMockRecorder) Save(session interface{}) *gomock.Call
- func (mr *MockSessionManagerMockRecorder) SessionName() *gomock.Call
- func (mr *MockSessionManagerMockRecorder) SetCookieString(arg0 interface{}) *gomock.Call
- func (mr *MockSessionManagerMockRecorder) Start(w, r interface{}) *gomock.Call
- type PHPSessionEncoder
- type Session
- type SessionEncoder
- type SessionIDCreator
- type SessionManager
- type SessionManagerConfig
- type UUIDCreator
Constants ¶
const (
DefaultSessionName = "PHPSESSID"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockSessionManager ¶
type MockSessionManager struct {
// contains filtered or unexported fields
}
MockSessionManager is a mock of SessionManager interface
func NewMockSessionManager ¶
func NewMockSessionManager(ctrl *gomock.Controller) *MockSessionManager
NewMockSessionManager creates a new mock instance
func (*MockSessionManager) EXPECT ¶
func (m *MockSessionManager) EXPECT() *MockSessionManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockSessionManager) Encoder ¶
func (m *MockSessionManager) Encoder() SessionEncoder
Encoder mocks base method
func (*MockSessionManager) SIDCreator ¶
func (m *MockSessionManager) SIDCreator() SessionIDCreator
SIDCreator mocks base method
func (*MockSessionManager) Save ¶
func (m *MockSessionManager) Save(session *Session) error
Save mocks base method
func (*MockSessionManager) SessionName ¶
func (m *MockSessionManager) SessionName() string
SessionName mocks base method
func (*MockSessionManager) SetCookieString ¶
func (m *MockSessionManager) SetCookieString(arg0 string) string
SetCookieString mocks base method
func (*MockSessionManager) Start ¶
func (m *MockSessionManager) Start(w http.ResponseWriter, r *http.Request) (*Session, error)
Start mocks base method
type MockSessionManagerMockRecorder ¶
type MockSessionManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockSessionManagerMockRecorder is the mock recorder for MockSessionManager
func (*MockSessionManagerMockRecorder) Encoder ¶
func (mr *MockSessionManagerMockRecorder) Encoder() *gomock.Call
Encoder indicates an expected call of Encoder
func (*MockSessionManagerMockRecorder) SIDCreator ¶
func (mr *MockSessionManagerMockRecorder) SIDCreator() *gomock.Call
SIDCreator indicates an expected call of SIDCreator
func (*MockSessionManagerMockRecorder) Save ¶
func (mr *MockSessionManagerMockRecorder) Save(session interface{}) *gomock.Call
Save indicates an expected call of Save
func (*MockSessionManagerMockRecorder) SessionName ¶
func (mr *MockSessionManagerMockRecorder) SessionName() *gomock.Call
SessionName indicates an expected call of SessionName
func (*MockSessionManagerMockRecorder) SetCookieString ¶
func (mr *MockSessionManagerMockRecorder) SetCookieString(arg0 interface{}) *gomock.Call
SetCookieString indicates an expected call of SetCookieString
func (*MockSessionManagerMockRecorder) Start ¶
func (mr *MockSessionManagerMockRecorder) Start(w, r interface{}) *gomock.Call
Start indicates an expected call of Start
type PHPSessionEncoder ¶
type PHPSessionEncoder struct {
SessionEncoder
}
func (*PHPSessionEncoder) Decode ¶
func (e *PHPSessionEncoder) Decode(raw string) (phpencode.PhpSession, error)
func (*PHPSessionEncoder) Encode ¶
func (e *PHPSessionEncoder) Encode(session phpencode.PhpSession) (string, error)
type Session ¶
type Session struct { SessionID string Value phpencode.PhpSession }
Session handle creation/modification of session parametr
type SessionEncoder ¶
type SessionEncoder interface { Encode(session phpencode.PhpSession) (string, error) Decode(raw string) (phpencode.PhpSession, error) }
type SessionIDCreator ¶
type SessionIDCreator interface {
CreateSID() string
}
SessionIDCreator is adoptation of PHP SessionIDInterface Reference at https://www.php.net/manual/en/class.sessionidinterface.php
type SessionManager ¶
type SessionManager interface { Start(w http.ResponseWriter, r *http.Request) (session *Session, err error) Save(session *Session) error SessionName() string SIDCreator() SessionIDCreator Encoder() SessionEncoder SetCookieString(string) string }
func NewSessionManager ¶
func NewSessionManager(config SessionManagerConfig) SessionManager
NewSessionManager create new instance of SessionManager
func NewSessionManagerRaw ¶
func NewSessionManagerRaw( sessionName string, sidCreator SessionIDCreator, encoder SessionEncoder, config SessionManagerConfig, ) SessionManager
type SessionManagerConfig ¶
type UUIDCreator ¶
type UUIDCreator struct {
SessionIDCreator
}
UUIDCreator generate session ID using UUID V4
func (*UUIDCreator) CreateSID ¶
func (c *UUIDCreator) CreateSID() string
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
examples
|
|
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |