mysql

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Uid        string                 `json:"uid"`
	Status     string                 `json:"status"`
	Attributes map[string]interface{} `json:"attributes"`
}

type CreateSecretInfo

type CreateSecretInfo struct {
	Secret           string `json:"secret"`
	Type             string `json:"type"`
	Target           string `json:"target"`
	Available_Period string `json:"available_period"`
	Pending_Period   string `json:"pending_period"`
}

type GetSecretInfo

type GetSecretInfo struct {
	Secret         string    `json:"secret"`
	Type           string    `json:"type"`
	Delete_At      time.Time `json:"delete_at"`
	Pending_Period string    `json:"pending_period"`
}

type MySQLDepot

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

func NewTableDepot

func NewTableDepot(dsn, dirPath string) (*MySQLDepot, error)

func (*MySQLDepot) AddClient

func (d *MySQLDepot) AddClient(client Client, initialStatus string) error

func (*MySQLDepot) CA

func (d *MySQLDepot) CA(pass []byte) ([]*x509.Certificate, *rsa.PrivateKey, error)

func (*MySQLDepot) CheckCertExpiration

func (d *MySQLDepot) CheckCertExpiration() error

func (*MySQLDepot) CheckCertRevocation

func (d *MySQLDepot) CheckCertRevocation() error

func (*MySQLDepot) CheckSecretExpiration

func (d *MySQLDepot) CheckSecretExpiration() error

func (*MySQLDepot) CreateSecret

func (d *MySQLDepot) CreateSecret(info CreateSecretInfo) error

func (*MySQLDepot) DeleteSecret

func (d *MySQLDepot) DeleteSecret(target string) error

func (*MySQLDepot) GetCertsByCN

func (d *MySQLDepot) GetCertsByCN(cn string) ([]certForJSON, error)

func (*MySQLDepot) GetClient

func (d *MySQLDepot) GetClient(uid string) (*Client, error)

func (*MySQLDepot) GetClientList

func (d *MySQLDepot) GetClientList() ([]Client, error)

func (*MySQLDepot) GetFile

func (d *MySQLDepot) GetFile(path string) (*file, error)

func (*MySQLDepot) GetNextSerial added in v0.1.3

func (d *MySQLDepot) GetNextSerial() (*big.Int, error)

func (*MySQLDepot) GetRCs

func (d *MySQLDepot) GetRCs() ([]pkix.RevokedCertificate, error)

func (*MySQLDepot) GetSecret

func (d *MySQLDepot) GetSecret(target string) (GetSecretInfo, error)

func (*MySQLDepot) HasCN

func (d *MySQLDepot) HasCN(cn string, allowTime int, cert *x509.Certificate, revokeOldCertificate bool) (bool, error)

func (*MySQLDepot) Put

func (d *MySQLDepot) Put(cn string, crt *x509.Certificate, challenge string) error

func (*MySQLDepot) RevokeCertificate

func (d *MySQLDepot) RevokeCertificate(uid string, revocation_date time.Time) error

func (*MySQLDepot) Serial

func (d *MySQLDepot) Serial() (*big.Int, error)

func (*MySQLDepot) UpdateAttributesClient

func (d *MySQLDepot) UpdateAttributesClient(info UpdateInfo) error

func (*MySQLDepot) UpdateStatusClient

func (d *MySQLDepot) UpdateStatusClient(uid string, status string) error

type UpdateInfo

type UpdateInfo struct {
	Uid        string                 `json:"uid"`
	Attributes map[string]interface{} `json:"attributes"`
}

Jump to

Keyboard shortcuts

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