identity

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: May 4, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractDomain added in v0.1.0

func ExtractDomain(email string) string

func ExtractLocalPart added in v0.1.0

func ExtractLocalPart(email string) string

func FetchAllIdentities added in v0.1.0

func FetchAllIdentities(client Client) ([]admina.Identity, error)

Common utility functions

func IsMergeAllowed added in v1.1.0

func IsMergeAllowed(parent admina.Identity, child admina.Identity) bool

IDのタイプを確認する関数

func MaskEmail added in v0.1.0

func MaskEmail(email string) string

MaskEmail はメールアドレスをマスクします

func MergeIdentities added in v0.1.0

func MergeIdentities(client Client, config *MergeConfig) error

func PrintIdentityMatrix

func PrintIdentityMatrix(client Client, outputFormat string) error

func SetNoMask added in v1.0.0

func SetNoMask(flag bool)

SetNoMask はメールマスクの設定を行います

Types

type CSVFormatter added in v0.1.0

type CSVFormatter struct {
	OutputDir string
}

CSVFormatter の実装

func (*CSVFormatter) Format added in v0.1.0

func (f *CSVFormatter) Format(result *MergeResult, mergedCount, skippedCount int) (string, error)

type CSVWriter added in v0.1.0

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

CSVWriter はCSVファイルの書き込みを行うための構造体

func NewCSVWriter added in v0.1.0

func NewCSVWriter(outputDir string) (*CSVWriter, error)

NewCSVWriter は新しいCSVWriterを作成します

func (*CSVWriter) WriteCSV added in v0.1.0

func (w *CSVWriter) WriteCSV(filename string, headers []string, rows [][]string) error

WriteCSV はCSVファイルを書き込みます

type Client

type Client interface {
	GetIdentities(ctx context.Context, cursor string) ([]admina.Identity, string, error)
	MergeIdentities(ctx context.Context, fromPeopleID, toPeopleID int) (admina.MergeIdentity, error)
}

Client interface defines the methods required for identity operations

type Formatter added in v0.1.0

type Formatter interface {
	Format(result *MergeResult, mergedCount, skippedCount int) (string, error)
}

Formatter はマージ結果のフォーマット方法を定義するインターフェース

type JSONFormatter added in v0.1.0

type JSONFormatter struct{}

JSONFormatter の実装

func (*JSONFormatter) Format added in v0.1.0

func (f *JSONFormatter) Format(result *MergeResult, mergedCount, skippedCount int) (string, error)

type JSONMatrixFormatter added in v0.1.0

type JSONMatrixFormatter struct{}

JSONMatrixFormatter の実装

func (*JSONMatrixFormatter) Format added in v0.1.0

func (f *JSONMatrixFormatter) Format(matrix *Matrix) (string, error)

type MarkdownFormatter added in v0.1.0

type MarkdownFormatter struct{}

MarkdownFormatter の実装

func (*MarkdownFormatter) Format added in v0.1.0

func (f *MarkdownFormatter) Format(result *MergeResult, mergedCount, skippedCount int) (string, error)

type MarkdownMatrixFormatter added in v0.1.0

type MarkdownMatrixFormatter struct{}

MarkdownMatrixFormatter の実装

func (*MarkdownMatrixFormatter) Format added in v0.1.0

func (f *MarkdownMatrixFormatter) Format(matrix *Matrix) (string, error)

type Matrix

type Matrix struct {
	ManagementTypes []string
	Statuses        []string
	Matrix          [][]int
}

func GetIdentityMatrix

func GetIdentityMatrix(client Client) (*Matrix, error)

type MatrixFormatter added in v0.1.0

type MatrixFormatter interface {
	Format(matrix *Matrix) (string, error)
}

Formatter はマトリックス結果のフォーマット方法を定義するインターフェース

type MergeCandidate added in v0.1.0

type MergeCandidate struct {
	Parent admina.Identity
	Child  admina.Identity
	Status string
	Reason string
}

type MergeConfig added in v0.1.0

type MergeConfig struct {
	ParentDomain string
	ChildDomains []string
	DryRun       bool
	AutoApprove  bool
	OutputFormat string
	OutputDir    string
}

type MergeResult added in v0.1.0

type MergeResult struct {
	Candidates []MergeCandidate
	Unmapped   []admina.Identity
	Summary    *MergeSummary
}

type MergeSummary added in v0.1.0

type MergeSummary struct {
	TotalIdentities    int
	MergeCandidates    int
	UnmappedIdentities int
	MatchCounts        map[string]int
	UnmappedCounts     map[string]int
}

type PrettyFormatter added in v0.1.0

type PrettyFormatter struct{}

PrettyFormatter の実装

func (*PrettyFormatter) Format added in v0.1.0

func (f *PrettyFormatter) Format(result *MergeResult, mergedCount, skippedCount int) (string, error)

type PrettyMatrixFormatter added in v0.1.0

type PrettyMatrixFormatter struct{}

PrettyMatrixFormatter の実装

func (*PrettyMatrixFormatter) Format added in v0.1.0

func (f *PrettyMatrixFormatter) Format(matrix *Matrix) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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