Documentation ¶
Overview ¶
Generated by protoc-ddl. protoc-gen-dao: v0.1
Index ¶
- func Desc(opt *listOpt)
- func Limit(limit int) func(opt *listOpt)
- type AccessToken
- func (d *AccessToken) Create(ctx context.Context, v *entity.AccessToken, opt ...ExecOption) (*entity.AccessToken, error)
- func (d *AccessToken) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *AccessToken) ListByUser(ctx context.Context, userId int32, opt ...ListOption) ([]*entity.AccessToken, error)
- func (d *AccessToken) Select(ctx context.Context, id int32) (*entity.AccessToken, error)
- func (d *AccessToken) SelectAccessToken(ctx context.Context, value string) (*entity.AccessToken, error)
- func (d *AccessToken) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *AccessToken) Update(ctx context.Context, v *entity.AccessToken, opt ...ExecOption) error
- type Code
- func (d *Code) Create(ctx context.Context, v *entity.Code, opt ...ExecOption) (*entity.Code, error)
- func (d *Code) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *Code) ListAll(ctx context.Context, opt ...ListOption) ([]*entity.Code, error)
- func (d *Code) Select(ctx context.Context, id int32) (*entity.Code, error)
- func (d *Code) SelectCode(ctx context.Context, code string) (*entity.Code, error)
- func (d *Code) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *Code) Update(ctx context.Context, v *entity.Code, opt ...ExecOption) error
- type ExecOption
- type ListOption
- type Node
- func (d *Node) Create(ctx context.Context, v *entity.Node, opt ...ExecOption) (*entity.Node, error)
- func (d *Node) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *Node) ListAll(ctx context.Context, opt ...ListOption) ([]*entity.Node, error)
- func (d *Node) ListHostname(ctx context.Context, hostname string, opt ...ListOption) ([]*entity.Node, error)
- func (d *Node) Select(ctx context.Context, id int32) (*entity.Node, error)
- func (d *Node) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *Node) Update(ctx context.Context, v *entity.Node, opt ...ExecOption) error
- type Relay
- func (d *Relay) Create(ctx context.Context, v *entity.Relay, opt ...ExecOption) (*entity.Relay, error)
- func (d *Relay) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *Relay) ListAll(ctx context.Context, opt ...ListOption) ([]*entity.Relay, error)
- func (d *Relay) ListName(ctx context.Context, name string, opt ...ListOption) ([]*entity.Relay, error)
- func (d *Relay) Select(ctx context.Context, id int32) (*entity.Relay, error)
- func (d *Relay) SelectEndpoint(ctx context.Context, name string, addr string) (*entity.Relay, error)
- func (d *Relay) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *Relay) Update(ctx context.Context, v *entity.Relay, opt ...ExecOption) error
- type Repository
- type RevokedCertificate
- func (d *RevokedCertificate) Create(ctx context.Context, v *entity.RevokedCertificate, opt ...ExecOption) (*entity.RevokedCertificate, error)
- func (d *RevokedCertificate) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *RevokedCertificate) ListAll(ctx context.Context, opt ...ListOption) ([]*entity.RevokedCertificate, error)
- func (d *RevokedCertificate) ListSerialNumber(ctx context.Context, serialNumber []byte, opt ...ListOption) ([]*entity.RevokedCertificate, error)
- func (d *RevokedCertificate) Select(ctx context.Context, id int32) (*entity.RevokedCertificate, error)
- func (d *RevokedCertificate) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *RevokedCertificate) Update(ctx context.Context, v *entity.RevokedCertificate, opt ...ExecOption) error
- type RoleBinding
- func (d *RoleBinding) Create(ctx context.Context, v *entity.RoleBinding, opt ...ExecOption) (*entity.RoleBinding, error)
- func (d *RoleBinding) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *RoleBinding) ListAll(ctx context.Context, opt ...ListOption) ([]*entity.RoleBinding, error)
- func (d *RoleBinding) ListUser(ctx context.Context, userId int32, opt ...ListOption) ([]*entity.RoleBinding, error)
- func (d *RoleBinding) Select(ctx context.Context, id int32) (*entity.RoleBinding, error)
- func (d *RoleBinding) SelectUserRole(ctx context.Context, userId int32, role string) (*entity.RoleBinding, error)
- func (d *RoleBinding) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *RoleBinding) Update(ctx context.Context, v *entity.RoleBinding, opt ...ExecOption) error
- type SSHKey
- func (d *SSHKey) Create(ctx context.Context, v *entity.SSHKey, opt ...ExecOption) (*entity.SSHKey, error)
- func (d *SSHKey) Delete(ctx context.Context, userId int32, opt ...ExecOption) error
- func (d *SSHKey) Select(ctx context.Context, userId int32) (*entity.SSHKey, error)
- func (d *SSHKey) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *SSHKey) Update(ctx context.Context, v *entity.SSHKey, opt ...ExecOption) error
- type SerialNumber
- func (d *SerialNumber) Create(ctx context.Context, v *entity.SerialNumber, opt ...ExecOption) (*entity.SerialNumber, error)
- func (d *SerialNumber) Delete(ctx context.Context, id int64, opt ...ExecOption) error
- func (d *SerialNumber) Select(ctx context.Context, id int64) (*entity.SerialNumber, error)
- func (d *SerialNumber) SelectSerialNumber(ctx context.Context, serialNumber []byte) (*entity.SerialNumber, error)
- func (d *SerialNumber) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *SerialNumber) Update(ctx context.Context, v *entity.SerialNumber, opt ...ExecOption) error
- type SignedCertificate
- func (d *SignedCertificate) Create(ctx context.Context, v *entity.SignedCertificate, opt ...ExecOption) (*entity.SignedCertificate, error)
- func (d *SignedCertificate) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *SignedCertificate) ListAll(ctx context.Context, opt ...ListOption) ([]*entity.SignedCertificate, error)
- func (d *SignedCertificate) ListSerialNumber(ctx context.Context, serialNumberId int64, opt ...ListOption) ([]*entity.SignedCertificate, error)
- func (d *SignedCertificate) Select(ctx context.Context, id int32) (*entity.SignedCertificate, error)
- func (d *SignedCertificate) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *SignedCertificate) Update(ctx context.Context, v *entity.SignedCertificate, opt ...ExecOption) error
- type Token
- func (d *Token) Create(ctx context.Context, v *entity.Token, opt ...ExecOption) (*entity.Token, error)
- func (d *Token) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *Token) ListAll(ctx context.Context, opt ...ListOption) ([]*entity.Token, error)
- func (d *Token) ListToken(ctx context.Context, token string, opt ...ListOption) ([]*entity.Token, error)
- func (d *Token) Select(ctx context.Context, id int32) (*entity.Token, error)
- func (d *Token) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *Token) Update(ctx context.Context, v *entity.Token, opt ...ExecOption) error
- type User
- func (d *User) Create(ctx context.Context, v *entity.User, opt ...ExecOption) (*entity.User, error)
- func (d *User) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *User) ListAll(ctx context.Context, opt ...ListOption) ([]*entity.User, error)
- func (d *User) Select(ctx context.Context, id int32) (*entity.User, error)
- func (d *User) SelectIdentity(ctx context.Context, identity string) (*entity.User, error)
- func (d *User) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *User) Update(ctx context.Context, v *entity.User, opt ...ExecOption) error
- type UserState
- func (d *UserState) Create(ctx context.Context, v *entity.UserState, opt ...ExecOption) (*entity.UserState, error)
- func (d *UserState) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *UserState) Select(ctx context.Context, id int32) (*entity.UserState, error)
- func (d *UserState) SelectState(ctx context.Context, state string) (*entity.UserState, error)
- func (d *UserState) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *UserState) Update(ctx context.Context, v *entity.UserState, opt ...ExecOption) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessToken ¶
type AccessToken struct {
// contains filtered or unexported fields
}
func NewAccessToken ¶
func NewAccessToken(conn *sql.DB) *AccessToken
func (*AccessToken) Create ¶
func (d *AccessToken) Create(ctx context.Context, v *entity.AccessToken, opt ...ExecOption) (*entity.AccessToken, error)
func (*AccessToken) Delete ¶
func (d *AccessToken) Delete(ctx context.Context, id int32, opt ...ExecOption) error
func (*AccessToken) ListByUser ¶
func (d *AccessToken) ListByUser(ctx context.Context, userId int32, opt ...ListOption) ([]*entity.AccessToken, error)
func (*AccessToken) Select ¶
func (d *AccessToken) Select(ctx context.Context, id int32) (*entity.AccessToken, error)
func (*AccessToken) SelectAccessToken ¶
func (d *AccessToken) SelectAccessToken(ctx context.Context, value string) (*entity.AccessToken, error)
func (*AccessToken) Update ¶
func (d *AccessToken) Update(ctx context.Context, v *entity.AccessToken, opt ...ExecOption) error
type Code ¶
type Code struct {
// contains filtered or unexported fields
}
func (*Code) SelectCode ¶
type ExecOption ¶
type ExecOption func(opt *execOpt)
func WithTx ¶
func WithTx(tx *sql.Tx) ExecOption
type ListOption ¶
type ListOption func(opt *listOpt)
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) ListHostname ¶
type Relay ¶
type Relay struct {
// contains filtered or unexported fields
}
func (*Relay) SelectEndpoint ¶
type Repository ¶
type Repository struct { Conn *sql.DB SerialNumber *SerialNumber SignedCertificate *SignedCertificate RevokedCertificate *RevokedCertificate Node *Node Relay *Relay Token *Token Code *Code User *User UserState *UserState SSHKey *SSHKey RoleBinding *RoleBinding AccessToken *AccessToken }
func NewRepository ¶
func NewRepository(conn *sql.DB) *Repository
type RevokedCertificate ¶
type RevokedCertificate struct {
// contains filtered or unexported fields
}
func NewRevokedCertificate ¶
func NewRevokedCertificate(conn *sql.DB) *RevokedCertificate
func (*RevokedCertificate) Create ¶
func (d *RevokedCertificate) Create(ctx context.Context, v *entity.RevokedCertificate, opt ...ExecOption) (*entity.RevokedCertificate, error)
func (*RevokedCertificate) Delete ¶
func (d *RevokedCertificate) Delete(ctx context.Context, id int32, opt ...ExecOption) error
func (*RevokedCertificate) ListAll ¶
func (d *RevokedCertificate) ListAll(ctx context.Context, opt ...ListOption) ([]*entity.RevokedCertificate, error)
func (*RevokedCertificate) ListSerialNumber ¶
func (d *RevokedCertificate) ListSerialNumber(ctx context.Context, serialNumber []byte, opt ...ListOption) ([]*entity.RevokedCertificate, error)
func (*RevokedCertificate) Select ¶
func (d *RevokedCertificate) Select(ctx context.Context, id int32) (*entity.RevokedCertificate, error)
func (*RevokedCertificate) Update ¶
func (d *RevokedCertificate) Update(ctx context.Context, v *entity.RevokedCertificate, opt ...ExecOption) error
type RoleBinding ¶
type RoleBinding struct {
// contains filtered or unexported fields
}
func NewRoleBinding ¶
func NewRoleBinding(conn *sql.DB) *RoleBinding
func (*RoleBinding) Create ¶
func (d *RoleBinding) Create(ctx context.Context, v *entity.RoleBinding, opt ...ExecOption) (*entity.RoleBinding, error)
func (*RoleBinding) Delete ¶
func (d *RoleBinding) Delete(ctx context.Context, id int32, opt ...ExecOption) error
func (*RoleBinding) ListAll ¶
func (d *RoleBinding) ListAll(ctx context.Context, opt ...ListOption) ([]*entity.RoleBinding, error)
func (*RoleBinding) ListUser ¶
func (d *RoleBinding) ListUser(ctx context.Context, userId int32, opt ...ListOption) ([]*entity.RoleBinding, error)
func (*RoleBinding) Select ¶
func (d *RoleBinding) Select(ctx context.Context, id int32) (*entity.RoleBinding, error)
func (*RoleBinding) SelectUserRole ¶
func (d *RoleBinding) SelectUserRole(ctx context.Context, userId int32, role string) (*entity.RoleBinding, error)
func (*RoleBinding) Update ¶
func (d *RoleBinding) Update(ctx context.Context, v *entity.RoleBinding, opt ...ExecOption) error
type SSHKey ¶
type SSHKey struct {
// contains filtered or unexported fields
}
type SerialNumber ¶
type SerialNumber struct {
// contains filtered or unexported fields
}
func NewSerialNumber ¶
func NewSerialNumber(conn *sql.DB) *SerialNumber
func (*SerialNumber) Create ¶
func (d *SerialNumber) Create(ctx context.Context, v *entity.SerialNumber, opt ...ExecOption) (*entity.SerialNumber, error)
func (*SerialNumber) Delete ¶
func (d *SerialNumber) Delete(ctx context.Context, id int64, opt ...ExecOption) error
func (*SerialNumber) Select ¶
func (d *SerialNumber) Select(ctx context.Context, id int64) (*entity.SerialNumber, error)
func (*SerialNumber) SelectSerialNumber ¶
func (d *SerialNumber) SelectSerialNumber(ctx context.Context, serialNumber []byte) (*entity.SerialNumber, error)
func (*SerialNumber) Update ¶
func (d *SerialNumber) Update(ctx context.Context, v *entity.SerialNumber, opt ...ExecOption) error
type SignedCertificate ¶
type SignedCertificate struct {
// contains filtered or unexported fields
}
func NewSignedCertificate ¶
func NewSignedCertificate(conn *sql.DB) *SignedCertificate
func (*SignedCertificate) Create ¶
func (d *SignedCertificate) Create(ctx context.Context, v *entity.SignedCertificate, opt ...ExecOption) (*entity.SignedCertificate, error)
func (*SignedCertificate) Delete ¶
func (d *SignedCertificate) Delete(ctx context.Context, id int32, opt ...ExecOption) error
func (*SignedCertificate) ListAll ¶
func (d *SignedCertificate) ListAll(ctx context.Context, opt ...ListOption) ([]*entity.SignedCertificate, error)
func (*SignedCertificate) ListSerialNumber ¶
func (d *SignedCertificate) ListSerialNumber(ctx context.Context, serialNumberId int64, opt ...ListOption) ([]*entity.SignedCertificate, error)
func (*SignedCertificate) Select ¶
func (d *SignedCertificate) Select(ctx context.Context, id int32) (*entity.SignedCertificate, error)
func (*SignedCertificate) Update ¶
func (d *SignedCertificate) Update(ctx context.Context, v *entity.SignedCertificate, opt ...ExecOption) error
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) SelectIdentity ¶
Click to show internal directories.
Click to hide internal directories.