services

package
v1.331.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptedData

type EncryptedData struct {
	EncryptedValue string
	Metadata       EncryptionMetadata
}

EncryptedData は暗号化されたデータとメタデータを保持する

type EncryptionMetadata

type EncryptionMetadata struct {
	Algorithm   string    // 暗号化アルゴリズム ("noop", "aws-kms", "aes-256-gcm")
	KeyID       string    // キーID
	EncryptedAt time.Time // 暗号化日時
	Version     string    // バージョン
}

EncryptionMetadata は暗号化のメタデータ

type EncryptionService

type EncryptionService interface {
	// Encrypt は平文を暗号化する
	Encrypt(ctx context.Context, plaintext string) (*EncryptedData, error)

	// Decrypt は暗号化されたデータを復号する
	Decrypt(ctx context.Context, encrypted *EncryptedData) (string, error)

	// Algorithm は暗号化方式の名前を返す
	Algorithm() string

	// KeyID はキーIDを返す
	KeyID() string
}

EncryptionService は暗号化・復号化を行うサービスのインターフェース

Jump to

Keyboard shortcuts

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