Documentation ¶
Index ¶
- Constants
- Variables
- type CertRepository
- type CertRepositoryMySQL
- func (c *CertRepositoryMySQL) CreateCert(ctx context.Context, userId string, name string, data []byte, certType string, ...) (*daos.Certificate, error)
- func (c *CertRepositoryMySQL) DeleteCertByID(ctx context.Context, id string) error
- func (c *CertRepositoryMySQL) GetCertByID(ctx context.Context, id string) (*daos.Certificate, error)
- func (c *CertRepositoryMySQL) GetCertsByParentCA(ctx context.Context, parentCA string) ([]*daos.Certificate, error)
- func (c *CertRepositoryMySQL) GetCertsByUserID(ctx context.Context, userId string, certTypes []string) ([]*daos.Certificate, error)
- func (c *CertRepositoryMySQL) GetKeyIDByCertID(ctx context.Context, certID string) (string, error)
- type KeyRepository
- type KeyRepositoryMySQL
- func (k *KeyRepositoryMySQL) CreateKey(ctx context.Context, userId string, data []byte, algorithm string, name string) (*daos.Key, error)
- func (k *KeyRepositoryMySQL) GetKey(ctx context.Context, id string) (*daos.Key, error)
- func (k *KeyRepositoryMySQL) GetKeysForUser(ctx context.Context, userId string) ([]*daos.Key, error)
- type UserRepository
- type UserRepositoryMySql
- func (u *UserRepositoryMySql) CleanupSessions(ctx context.Context) (int, error)
- func (u *UserRepositoryMySql) CreateSession(ctx context.Context, userID string) (*contracts.SessionResponse, error)
- func (u *UserRepositoryMySql) CreateUser(ctx context.Context, createUser *contracts.CreateUserRequest) (*daos.User, error)
- func (u *UserRepositoryMySql) GetUserByEmail(ctx context.Context, email string) (*daos.User, error)
- func (u *UserRepositoryMySql) GetUserBySessionID(ctx context.Context, sessionID string) (*daos.User, error)
- type UserRepositoryNeo4j
- func (r *UserRepositoryNeo4j) CleanupSessions(ctx context.Context) (int, error)
- func (r *UserRepositoryNeo4j) CreateSession(ctx context.Context, userID string) (*contracts.SessionResponse, error)
- func (r *UserRepositoryNeo4j) CreateUser(ctx context.Context, createUser *contracts.CreateUserRequest) (*daos.User, error)
- func (r *UserRepositoryNeo4j) GetUserByEmail(ctx context.Context, email string) (*daos.User, error)
- func (r *UserRepositoryNeo4j) GetUserBySessionID(ctx context.Context, sessionID string) (*daos.User, error)
Constants ¶
View Source
const NeoErrNoRecordsMsg = "Result contains no more records"
Variables ¶
View Source
var ErrNoRecord = errors.New("no record found")
Functions ¶
This section is empty.
Types ¶
type CertRepository ¶
type CertRepository interface { CreateCert( ctx context.Context, userId string, name string, data []byte, certType string, parentCA string, keyId string, ) (*daos.Certificate, error) DeleteCertByID( ctx context.Context, id string, ) error GetCertByID( ctx context.Context, id string, ) (*daos.Certificate, error) GetCertsByUserID( ctx context.Context, userId string, certTypes []string, ) ([]*daos.Certificate, error) GetKeyIDByCertID( ctx context.Context, certID string, ) (string, error) GetCertsByParentCA( ctx context.Context, parentCA string, ) ([]*daos.Certificate, error) }
type CertRepositoryMySQL ¶
type CertRepositoryMySQL struct {
// contains filtered or unexported fields
}
func NewCertRepositoryMySQL ¶
func NewCertRepositoryMySQL(db *gorm.DB) *CertRepositoryMySQL
func (*CertRepositoryMySQL) CreateCert ¶
func (*CertRepositoryMySQL) DeleteCertByID ¶
func (c *CertRepositoryMySQL) DeleteCertByID(ctx context.Context, id string) error
func (*CertRepositoryMySQL) GetCertByID ¶
func (c *CertRepositoryMySQL) GetCertByID(ctx context.Context, id string) ( *daos.Certificate, error, )
func (*CertRepositoryMySQL) GetCertsByParentCA ¶
func (c *CertRepositoryMySQL) GetCertsByParentCA( ctx context.Context, parentCA string, ) ([]*daos.Certificate, error)
func (*CertRepositoryMySQL) GetCertsByUserID ¶
func (c *CertRepositoryMySQL) GetCertsByUserID( ctx context.Context, userId string, certTypes []string, ) ([]*daos.Certificate, error)
func (*CertRepositoryMySQL) GetKeyIDByCertID ¶
type KeyRepository ¶
type KeyRepositoryMySQL ¶
type KeyRepositoryMySQL struct {
// contains filtered or unexported fields
}
func NewKeyRepositoryMySQL ¶
func NewKeyRepositoryMySQL(db *gorm.DB) *KeyRepositoryMySQL
func (*KeyRepositoryMySQL) GetKeysForUser ¶
type UserRepository ¶
type UserRepository interface { CleanupSessions(ctx context.Context) (int, error) CreateSession(ctx context.Context, userID string) (*contracts.SessionResponse, error) CreateUser(ctx context.Context, user *contracts.CreateUserRequest) (*daos.User, error) GetUserByEmail(ctx context.Context, email string) (*daos.User, error) GetUserBySessionID(ctx context.Context, sessionID string) (*daos.User, error) }
type UserRepositoryMySql ¶
type UserRepositoryMySql struct {
// contains filtered or unexported fields
}
func NewUserRepositoryMySql ¶
func NewUserRepositoryMySql(db *gorm.DB) *UserRepositoryMySql
func (*UserRepositoryMySql) CleanupSessions ¶
func (u *UserRepositoryMySql) CleanupSessions(ctx context.Context) (int, error)
func (*UserRepositoryMySql) CreateSession ¶
func (u *UserRepositoryMySql) CreateSession( ctx context.Context, userID string, ) (*contracts.SessionResponse, error)
func (*UserRepositoryMySql) CreateUser ¶
func (u *UserRepositoryMySql) CreateUser( ctx context.Context, createUser *contracts.CreateUserRequest, ) (*daos.User, error)
func (*UserRepositoryMySql) GetUserByEmail ¶
func (*UserRepositoryMySql) GetUserBySessionID ¶
type UserRepositoryNeo4j ¶
type UserRepositoryNeo4j struct {
// contains filtered or unexported fields
}
func NewUserRepositoryNeo4j ¶
func NewUserRepositoryNeo4j(driver neo4j.Driver) *UserRepositoryNeo4j
func (*UserRepositoryNeo4j) CleanupSessions ¶
func (r *UserRepositoryNeo4j) CleanupSessions(ctx context.Context) (int, error)
func (*UserRepositoryNeo4j) CreateSession ¶
func (r *UserRepositoryNeo4j) CreateSession( ctx context.Context, userID string, ) (*contracts.SessionResponse, error)
func (*UserRepositoryNeo4j) CreateUser ¶
func (r *UserRepositoryNeo4j) CreateUser( ctx context.Context, createUser *contracts.CreateUserRequest, ) (*daos.User, error)
func (*UserRepositoryNeo4j) GetUserByEmail ¶
func (*UserRepositoryNeo4j) GetUserBySessionID ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.