2023-11-01 16:21:17 -04:00
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
2020-10-09 13:18:53 -04:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2023-11-01 16:21:17 -04:00
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: controller/api/services/v1/authtokens_service.proto
2020-10-09 13:18:53 -04:00
package services
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
2021-02-22 12:46:00 -05:00
// Requires gRPC-Go v1.32.0 or later.
2020-11-11 14:41:05 -05:00
const _ = grpc . SupportPackageIsVersion7
2020-10-09 13:18:53 -04:00
2023-11-01 16:21:17 -04:00
const (
AuthTokenService_GetAuthToken_FullMethodName = "/controller.api.services.v1.AuthTokenService/GetAuthToken"
AuthTokenService_ListAuthTokens_FullMethodName = "/controller.api.services.v1.AuthTokenService/ListAuthTokens"
AuthTokenService_DeleteAuthToken_FullMethodName = "/controller.api.services.v1.AuthTokenService/DeleteAuthToken"
)
2020-10-09 13:18:53 -04:00
// AuthTokenServiceClient is the client API for AuthTokenService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type AuthTokenServiceClient interface {
// GetAuthToken returns a stored Auth Token if present. The provided request
// must include the Auth Token id and if it is missing, malformed or
// referencing a non existing resource an error is returned.
GetAuthToken ( ctx context . Context , in * GetAuthTokenRequest , opts ... grpc . CallOption ) ( * GetAuthTokenResponse , error )
// ListAuthTokens returns a list of stored Auth Tokens which exist inside
// the provided scope. The request must include the scope ids for
// the Auth Tokens being listed. If the scope id is missing, malformed, or
// referencing a non existing resource, an error is returned.
ListAuthTokens ( ctx context . Context , in * ListAuthTokensRequest , opts ... grpc . CallOption ) ( * ListAuthTokensResponse , error )
// DeleteAuthToken removes a Auth Token from Boundary. If the provided
// Auth Token id is malformed or not provided an error is returned.
DeleteAuthToken ( ctx context . Context , in * DeleteAuthTokenRequest , opts ... grpc . CallOption ) ( * DeleteAuthTokenResponse , error )
}
type authTokenServiceClient struct {
cc grpc . ClientConnInterface
}
func NewAuthTokenServiceClient ( cc grpc . ClientConnInterface ) AuthTokenServiceClient {
return & authTokenServiceClient { cc }
}
func ( c * authTokenServiceClient ) GetAuthToken ( ctx context . Context , in * GetAuthTokenRequest , opts ... grpc . CallOption ) ( * GetAuthTokenResponse , error ) {
out := new ( GetAuthTokenResponse )
2023-11-01 16:21:17 -04:00
err := c . cc . Invoke ( ctx , AuthTokenService_GetAuthToken_FullMethodName , in , out , opts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * authTokenServiceClient ) ListAuthTokens ( ctx context . Context , in * ListAuthTokensRequest , opts ... grpc . CallOption ) ( * ListAuthTokensResponse , error ) {
out := new ( ListAuthTokensResponse )
2023-11-01 16:21:17 -04:00
err := c . cc . Invoke ( ctx , AuthTokenService_ListAuthTokens_FullMethodName , in , out , opts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * authTokenServiceClient ) DeleteAuthToken ( ctx context . Context , in * DeleteAuthTokenRequest , opts ... grpc . CallOption ) ( * DeleteAuthTokenResponse , error ) {
out := new ( DeleteAuthTokenResponse )
2023-11-01 16:21:17 -04:00
err := c . cc . Invoke ( ctx , AuthTokenService_DeleteAuthToken_FullMethodName , in , out , opts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
// AuthTokenServiceServer is the server API for AuthTokenService service.
2020-11-11 14:41:05 -05:00
// All implementations must embed UnimplementedAuthTokenServiceServer
// for forward compatibility
2020-10-09 13:18:53 -04:00
type AuthTokenServiceServer interface {
// GetAuthToken returns a stored Auth Token if present. The provided request
// must include the Auth Token id and if it is missing, malformed or
// referencing a non existing resource an error is returned.
GetAuthToken ( context . Context , * GetAuthTokenRequest ) ( * GetAuthTokenResponse , error )
// ListAuthTokens returns a list of stored Auth Tokens which exist inside
// the provided scope. The request must include the scope ids for
// the Auth Tokens being listed. If the scope id is missing, malformed, or
// referencing a non existing resource, an error is returned.
ListAuthTokens ( context . Context , * ListAuthTokensRequest ) ( * ListAuthTokensResponse , error )
// DeleteAuthToken removes a Auth Token from Boundary. If the provided
// Auth Token id is malformed or not provided an error is returned.
DeleteAuthToken ( context . Context , * DeleteAuthTokenRequest ) ( * DeleteAuthTokenResponse , error )
2020-11-11 14:41:05 -05:00
mustEmbedUnimplementedAuthTokenServiceServer ()
2020-10-09 13:18:53 -04:00
}
2020-11-11 14:41:05 -05:00
// UnimplementedAuthTokenServiceServer must be embedded to have forward compatible implementations.
2021-01-08 10:32:02 -05:00
type UnimplementedAuthTokenServiceServer struct {
}
2020-10-09 13:18:53 -04:00
2020-11-11 14:41:05 -05:00
func ( UnimplementedAuthTokenServiceServer ) GetAuthToken ( context . Context , * GetAuthTokenRequest ) ( * GetAuthTokenResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method GetAuthToken not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedAuthTokenServiceServer ) ListAuthTokens ( context . Context , * ListAuthTokensRequest ) ( * ListAuthTokensResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method ListAuthTokens not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedAuthTokenServiceServer ) DeleteAuthToken ( context . Context , * DeleteAuthTokenRequest ) ( * DeleteAuthTokenResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method DeleteAuthToken not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedAuthTokenServiceServer ) mustEmbedUnimplementedAuthTokenServiceServer () {}
2020-10-09 13:18:53 -04:00
2020-11-11 14:41:05 -05:00
// UnsafeAuthTokenServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AuthTokenServiceServer will
// result in compilation errors.
type UnsafeAuthTokenServiceServer interface {
mustEmbedUnimplementedAuthTokenServiceServer ()
}
func RegisterAuthTokenServiceServer ( s grpc . ServiceRegistrar , srv AuthTokenServiceServer ) {
2021-02-22 12:46:00 -05:00
s . RegisterService ( & AuthTokenService_ServiceDesc , srv )
2020-10-09 13:18:53 -04:00
}
func _AuthTokenService_GetAuthToken_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( GetAuthTokenRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( AuthTokenServiceServer ). GetAuthToken ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : AuthTokenService_GetAuthToken_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( AuthTokenServiceServer ). GetAuthToken ( ctx , req .( * GetAuthTokenRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _AuthTokenService_ListAuthTokens_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( ListAuthTokensRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( AuthTokenServiceServer ). ListAuthTokens ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : AuthTokenService_ListAuthTokens_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( AuthTokenServiceServer ). ListAuthTokens ( ctx , req .( * ListAuthTokensRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _AuthTokenService_DeleteAuthToken_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( DeleteAuthTokenRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( AuthTokenServiceServer ). DeleteAuthToken ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : AuthTokenService_DeleteAuthToken_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( AuthTokenServiceServer ). DeleteAuthToken ( ctx , req .( * DeleteAuthTokenRequest ))
}
return interceptor ( ctx , in , info , handler )
}
2021-02-22 12:46:00 -05:00
// AuthTokenService_ServiceDesc is the grpc.ServiceDesc for AuthTokenService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AuthTokenService_ServiceDesc = grpc . ServiceDesc {
2020-10-09 13:18:53 -04:00
ServiceName : "controller.api.services.v1.AuthTokenService" ,
HandlerType : ( * AuthTokenServiceServer )( nil ),
Methods : [] grpc . MethodDesc {
{
MethodName : "GetAuthToken" ,
Handler : _AuthTokenService_GetAuthToken_Handler ,
},
{
MethodName : "ListAuthTokens" ,
Handler : _AuthTokenService_ListAuthTokens_Handler ,
},
{
MethodName : "DeleteAuthToken" ,
Handler : _AuthTokenService_DeleteAuthToken_Handler ,
},
},
Streams : [] grpc . StreamDesc {},
Metadata : "controller/api/services/v1/authtokens_service.proto" ,
}