Documentation
¶
Index ¶
- func StartGRPCServer(tokenService *TokenService) *grpc.Server
- func StartServers(cfg Config) error
- type AuthInterceptor
- type Config
- type Token
- type TokenService
- func (s *TokenService) Load() error
- func (s *TokenService) RetrieveInstallation(ctx context.Context, req *proto.Installation) (*proto.Installation, error)
- func (s *TokenService) RetrieveToken(ctx context.Context, req *proto.SingleToken) (*proto.SingleToken, error)
- func (s *TokenService) RevokeToken(ctx context.Context, req *proto.SingleToken) (*proto.RevokeMessage, error)
- func (s *TokenService) Save() error
- func (s *TokenService) StoreInstallation(ctx context.Context, req *proto.Installation) (*proto.Installation, error)
- func (s *TokenService) StoreToken(ctx context.Context, req *proto.SingleToken) (*proto.SingleToken, error)
- func (s *TokenService) SyncWithError(ctx context.Context, period time.Duration, errCh chan<- error)
- func (s *TokenService) UpdateToken(ctx context.Context, req *proto.SingleToken) (*proto.SingleToken, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartGRPCServer ¶
func StartGRPCServer(tokenService *TokenService) *grpc.Server
func StartServers ¶
Types ¶
type AuthInterceptor ¶
type AuthInterceptor struct {
// contains filtered or unexported fields
}
gRPC Server
func NewAuthInterceptor ¶
func NewAuthInterceptor(publicKey string) *AuthInterceptor
func (*AuthInterceptor) Stream ¶
func (interceptor *AuthInterceptor) Stream() grpc.StreamServerInterceptor
func (*AuthInterceptor) Unary ¶
func (interceptor *AuthInterceptor) Unary() grpc.UnaryServerInterceptor
type TokenService ¶
type TokenService struct { proto.UnimplementedTokenServer // contains filtered or unexported fields }
TokenService represents a service for managing OAuth2 tokens.
func NewTokenService ¶
func NewTokenService(cfg Config) *TokenService
NewTokenService creates a new instance of TokenService.
func (*TokenService) Load ¶
func (s *TokenService) Load() error
func (*TokenService) RetrieveInstallation ¶
func (s *TokenService) RetrieveInstallation(ctx context.Context, req *proto.Installation) (*proto.Installation, error)
RetrieveToken retrieves an OAuth2 token for a given GitHub user login name.
func (*TokenService) RetrieveToken ¶
func (s *TokenService) RetrieveToken(ctx context.Context, req *proto.SingleToken) (*proto.SingleToken, error)
RetrieveToken retrieves an OAuth2 token for a given GitHub user login name.
func (*TokenService) RevokeToken ¶
func (s *TokenService) RevokeToken(ctx context.Context, req *proto.SingleToken) (*proto.RevokeMessage, error)
RevokeToken(context.Context, *SingleToken) (*RevokeMessage, error)
func (*TokenService) Save ¶
func (s *TokenService) Save() error
func (*TokenService) StoreInstallation ¶
func (s *TokenService) StoreInstallation(ctx context.Context, req *proto.Installation) (*proto.Installation, error)
UpdateToken updates an existing OAuth2 token for a given GitHub user login name.
func (*TokenService) StoreToken ¶
func (s *TokenService) StoreToken(ctx context.Context, req *proto.SingleToken) (*proto.SingleToken, error)
func (*TokenService) SyncWithError ¶
func (*TokenService) UpdateToken ¶
func (s *TokenService) UpdateToken(ctx context.Context, req *proto.SingleToken) (*proto.SingleToken, error)
StoreToken stores an OAuth2 token for a given GitHub user login name.
Click to show internal directories.
Click to hide internal directories.