addrauth

package
v0.0.0-...-ad5f674 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotImplemented = errors.New("not implemented")

Functions

func GetInt64FromClaims

func GetInt64FromClaims(claims *map[string]interface{}, key string) int64

Get the clain value as an int64.

func GetStringFromClaims

func GetStringFromClaims(claims *map[string]interface{}, key string) string

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

func (s *AddrAuth) GetJwtFromContext(ctx context.Context) (*map[string]interface{}, error)

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

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

get current server version and uptime - health check

func (*AddrAuth) NewApiServer

func (s *AddrAuth) NewApiServer(gServer *grpc.Server) error

Bind our AddrAuth as the gRPC api server.

func (*AddrAuth) SetDatabaseConnection

func (s *AddrAuth) SetDatabaseConnection(sqlDB *sql.DB)

Set the database connection for the AddrAuth instance.

func (*AddrAuth) SetLogger

func (s *AddrAuth) SetLogger(logger log.Logger)

Set the logger for the AddrAuth instance.

func (*AddrAuth) SetPublicKey

func (s *AddrAuth) SetPublicKey(publicKeyFile string) error

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

Jump to

Keyboard shortcuts

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