Documentation ¶
Index ¶
- Constants
- func Version() string
- type LogLevelDecoder
- type Server
- func (s *Server) Lookup(ctx context.Context, in *pb.LookupRequest) (out *pb.LookupReply, err error)
- func (s *Server) Register(ctx context.Context, in *pb.RegisterRequest) (out *pb.RegisterReply, err error)
- func (s *Server) Search(ctx context.Context, in *pb.SearchRequest) (out *pb.SearchReply, err error)
- func (s *Server) SendVerificationEmail(vasp pb.VASP) (err error)
- func (s *Server) Serve() (err error)
- func (s *Server) Shutdown() (err error)
- type Settings
Constants ¶
const ( VersionMajor = 1 VersionMinor = 0 VersionPatch = 0 )
Version component constants for the current build.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogLevelDecoder ¶
LogLevelDecoder deserializes the log level from a config string.
func (*LogLevelDecoder) Decode ¶
func (ll *LogLevelDecoder) Decode(value string) error
Decode implements envconfig.Decoder
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the GRPC TRISADirectoryService.
func New ¶
New creates a TRISA Directory Service with the specified configuration and prepares it to listen for and serve GRPC requests.
func (*Server) Lookup ¶
func (s *Server) Lookup(ctx context.Context, in *pb.LookupRequest) (out *pb.LookupReply, err error)
Lookup a VASP entity by name or ID to get full details including the TRISA certification if it exists and the entity has been verified.
func (*Server) Register ¶
func (s *Server) Register(ctx context.Context, in *pb.RegisterRequest) (out *pb.RegisterReply, err error)
Register a new VASP entity with the directory service. After registration, the new entity must go through the verification process to get issued a certificate. The status of verification can be obtained by using the lookup RPC call.
func (*Server) Search ¶
func (s *Server) Search(ctx context.Context, in *pb.SearchRequest) (out *pb.SearchReply, err error)
Search for VASP entity records by name or by country in order to perform more detailed Lookup requests. The search process is purposefully simplistic at the moment.
func (*Server) SendVerificationEmail ¶
SendVerificationEmail is a shortcut for iComply verification in which we simply send an email to the TRISA admins and have them manually verify registrations.
type Settings ¶
type Settings struct { BindAddr string `envconfig:"TRISADS_BIND_ADDR" default:":4433"` DatabaseDSN string `envconfig:"TRISADS_DATABASE" required:"true"` SectigoUsername string `envconfig:"SECTIGO_USERNAME" required:"false"` SectigoPassword string `envconfig:"SECTIGO_PASSWORD" required:"false"` SendGridAPIKey string `envconfig:"SENDGRID_API_KEY" required:"false"` ServiceEmail string `envconfig:"TRISADS_SERVICE_EMAIL" default:"admin@vaspdirectory.net"` AdminEmail string `envconfig:"TRISADS_ADMIN_EMAIL" default:"admin@trisa.io"` LogLevel LogLevelDecoder `envconfig:"TRISADS_LOG_LEVEL" default:"info"` }
Settings uses envconfig to load required settings from the environment and validate them in preparation for running the TRISA Directory Service.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package sectigo provides API access to the Sectigo IoT Manager 20.7, which is used to sign certificate requests for directory service certificate issuance.
|
Package sectigo provides API access to the Sectigo IoT Manager 20.7, which is used to sign certificate requests for directory service certificate issuance. |
Package store provides an interface to database storage for the TRISA directory service.
|
Package store provides an interface to database storage for the TRISA directory service. |