Documentation ¶
Index ¶
- Variables
- func GetInt64FromClaims(claims *map[string]interface{}, key string) int64
- func GetStringFromClaims(claims *map[string]interface{}, key string) string
- type AddrAuth
- func (s *AddrAuth) CreateAddress(ctx context.Context, req *pb.CreateAddressRequest) (*pb.CreateAddressResponse, error)
- func (s *AddrAuth) CreateParty(ctx context.Context, req *pb.CreatePartyRequest) (*pb.CreatePartyResponse, error)
- func (s *AddrAuth) CreatePhone(ctx context.Context, req *pb.CreatePhoneRequest) (*pb.CreatePhoneResponse, error)
- func (s *AddrAuth) DeleteAddress(ctx context.Context, req *pb.DeleteAddressRequest) (*pb.DeleteAddressResponse, error)
- func (s *AddrAuth) DeleteParty(ctx context.Context, req *pb.DeletePartyRequest) (*pb.DeletePartyResponse, error)
- func (s *AddrAuth) DeletePhone(ctx context.Context, req *pb.DeletePhoneRequest) (*pb.DeletePhoneResponse, error)
- func (s *AddrAuth) GetAddress(ctx context.Context, req *pb.GetAddressRequest) (*pb.GetAddressResponse, error)
- func (s *AddrAuth) GetJwtFromContext(ctx context.Context) (*map[string]interface{}, error)
- func (s *AddrAuth) GetParties(ctx context.Context, req *pb.GetPartiesRequest) (*pb.GetPartiesResponse, error)
- func (s *AddrAuth) GetParty(ctx context.Context, req *pb.GetPartyRequest) (*pb.GetPartyResponse, error)
- func (s *AddrAuth) GetPartyWrapper(ctx context.Context, req *pb.GetPartyWrapperRequest) (*pb.GetPartyWrapperResponse, error)
- func (s *AddrAuth) GetPhone(ctx context.Context, req *pb.GetPhoneRequest) (*pb.GetPhoneResponse, error)
- func (s *AddrAuth) GetServerVersion(ctx context.Context, req *pb.GetServerVersionRequest) (*pb.GetServerVersionResponse, error)
- func (s *AddrAuth) NewApiServer(gServer *grpc.Server) error
- func (s *AddrAuth) SetDatabaseConnection(sqlDB *sql.DB)
- func (s *AddrAuth) SetLogger(logger log.Logger)
- func (s *AddrAuth) SetPublicKey(publicKeyFile string) error
- func (s *AddrAuth) UpdateAddress(ctx context.Context, req *pb.UpdateAddressRequest) (*pb.UpdateAddressResponse, error)
- func (s *AddrAuth) UpdateParty(ctx context.Context, req *pb.UpdatePartyRequest) (*pb.UpdatePartyResponse, error)
- func (s *AddrAuth) UpdatePhone(ctx context.Context, req *pb.UpdatePhoneRequest) (*pb.UpdatePhoneResponse, error)
Constants ¶
This section is empty.
Variables ¶
var NotImplemented = errors.New("not implemented")
Functions ¶
func GetInt64FromClaims ¶
Get the clain value as an int64.
func GetStringFromClaims ¶
Get the claim value as a string.
Types ¶
type AddrAuth ¶
type AddrAuth struct { pb.UnimplementedMServiceAddrbookServer // contains filtered or unexported fields }
func NewAddrAuth ¶
func NewAddrAuth(addrService pb.MServiceAddrbookServer) *AddrAuth
Get a new AddrAuth instance.
func (*AddrAuth) CreateAddress ¶
func (s *AddrAuth) CreateAddress(ctx context.Context, req *pb.CreateAddressRequest) (*pb.CreateAddressResponse, error)
create a new address for a party
func (*AddrAuth) CreateParty ¶
func (s *AddrAuth) CreateParty(ctx context.Context, req *pb.CreatePartyRequest) (*pb.CreatePartyResponse, error)
create new party
func (*AddrAuth) CreatePhone ¶
func (s *AddrAuth) CreatePhone(ctx context.Context, req *pb.CreatePhoneRequest) (*pb.CreatePhoneResponse, error)
create a new phone
func (*AddrAuth) DeleteAddress ¶
func (s *AddrAuth) DeleteAddress(ctx context.Context, req *pb.DeleteAddressRequest) (*pb.DeleteAddressResponse, error)
delete an existing address for a party
func (*AddrAuth) DeleteParty ¶
func (s *AddrAuth) DeleteParty(ctx context.Context, req *pb.DeletePartyRequest) (*pb.DeletePartyResponse, error)
delete an existing party
func (*AddrAuth) DeletePhone ¶
func (s *AddrAuth) DeletePhone(ctx context.Context, req *pb.DeletePhoneRequest) (*pb.DeletePhoneResponse, error)
delete an existing phone
func (*AddrAuth) GetAddress ¶
func (s *AddrAuth) GetAddress(ctx context.Context, req *pb.GetAddressRequest) (*pb.GetAddressResponse, error)
get an address for a party by id
func (*AddrAuth) GetJwtFromContext ¶
Get the JWT from the gRPC request context.
func (*AddrAuth) GetParties ¶
func (s *AddrAuth) GetParties(ctx context.Context, req *pb.GetPartiesRequest) (*pb.GetPartiesResponse, error)
get parties by mservice id
func (*AddrAuth) GetParty ¶
func (s *AddrAuth) GetParty(ctx context.Context, req *pb.GetPartyRequest) (*pb.GetPartyResponse, error)
get party by id
func (*AddrAuth) GetPartyWrapper ¶
func (s *AddrAuth) GetPartyWrapper(ctx context.Context, req *pb.GetPartyWrapperRequest) (*pb.GetPartyWrapperResponse, error)
get party wrapper by id
func (*AddrAuth) GetPhone ¶
func (s *AddrAuth) GetPhone(ctx context.Context, req *pb.GetPhoneRequest) (*pb.GetPhoneResponse, error)
get a phone for a party by id
func (*AddrAuth) GetServerVersion ¶
func (s *AddrAuth) GetServerVersion(ctx context.Context, req *pb.GetServerVersionRequest) (*pb.GetServerVersionResponse, error)
get current server version and uptime - health check
func (*AddrAuth) NewApiServer ¶
Bind our AddrAuth as the gRPC api server.
func (*AddrAuth) SetDatabaseConnection ¶
Set the database connection for the AddrAuth instance.
func (*AddrAuth) SetPublicKey ¶
Set the public RSA key for the AddrAuth instance, used to validate JWT.
func (*AddrAuth) UpdateAddress ¶
func (s *AddrAuth) UpdateAddress(ctx context.Context, req *pb.UpdateAddressRequest) (*pb.UpdateAddressResponse, error)
update an existing address for a party
func (*AddrAuth) UpdateParty ¶
func (s *AddrAuth) UpdateParty(ctx context.Context, req *pb.UpdatePartyRequest) (*pb.UpdatePartyResponse, error)
update an existing party
func (*AddrAuth) UpdatePhone ¶
func (s *AddrAuth) UpdatePhone(ctx context.Context, req *pb.UpdatePhoneRequest) (*pb.UpdatePhoneResponse, error)
update an existing phone