Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEmployeeFactory ¶
Types ¶
type CryptographyAlgorithm ¶
The Factory Design Pattern is a creational design pattern that provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created. The Factory Design Pattern is used when a class cannot anticipate the type of objects it needs to create, or when a class wants its subclasses to be able to specify the objects it creates.
func GetCryptographyAlgorithm ¶
func GetCryptographyAlgorithm(c CryptographyAlgorithmType) CryptographyAlgorithm
type CryptographyAlgorithmType ¶
type CryptographyAlgorithmType int
const ( SHA256 CryptographyAlgorithmType = iota + 1 SHA512 )
type Employee ¶
func GetEmployee ¶
type SHA256Algorithm ¶
type SHA256Algorithm struct {
}
func (*SHA256Algorithm) GenerateHash ¶
func (s *SHA256Algorithm) GenerateHash(w io.Writer, msg []byte)
type SHA512Algorithm ¶
type SHA512Algorithm struct {
}
func (*SHA512Algorithm) GenerateHash ¶
func (s *SHA512Algorithm) GenerateHash(w io.Writer, msg []byte)
Click to show internal directories.
Click to hide internal directories.