github.com/cloudwan/edgelq-sdk@v1.15.4/iam/client/v1alpha2/authorization/authorization_service.pb.client.go (about)

     1  // Code generated by protoc-gen-goten-client
     2  // API: AuthorizationService
     3  // DO NOT EDIT!!!
     4  
     5  package authorization_client
     6  
     7  import (
     8  	"context"
     9  
    10  	"google.golang.org/grpc"
    11  	"google.golang.org/protobuf/runtime/protoimpl"
    12  )
    13  
    14  // proto imports
    15  import (
    16  	permission "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/permission"
    17  	role "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/role"
    18  )
    19  
    20  // Reference imports to suppress errors if they are not otherwise used.
    21  var (
    22  	_ = protoimpl.DescBuilder{}
    23  	_ = new(context.Context)
    24  	_ = grpc.ClientConn{}
    25  )
    26  
    27  // make sure we're using proto imports
    28  var (
    29  	_ = &permission.Permission{}
    30  	_ = &role.Role{}
    31  )
    32  
    33  // This is a compile-time assertion to ensure that this generated file
    34  // is compatible with the proto package it is being compiled against.
    35  // A compilation error at this line likely means your copy of the
    36  // proto package needs to be updated.
    37  const (
    38  	// Verify that this generated code is sufficiently up-to-date.
    39  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    40  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    41  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    42  )
    43  
    44  // This is a compile-time assertion to ensure that this generated file
    45  // is compatible with the grpc package it is being compiled against.
    46  const _ = grpc.SupportPackageIsVersion6
    47  
    48  // AuthorizationServiceClient is the client API for AuthorizationService.
    49  //
    50  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
    51  type AuthorizationServiceClient interface {
    52  	CheckPermissions(ctx context.Context, in *CheckPermissionsRequest, opts ...grpc.CallOption) (*CheckPermissionsResponse, error)
    53  	CheckMyPermissions(ctx context.Context, in *CheckMyPermissionsRequest, opts ...grpc.CallOption) (*CheckMyPermissionsResponse, error)
    54  	CheckMyRoles(ctx context.Context, in *CheckMyRolesRequest, opts ...grpc.CallOption) (*CheckMyRolesResponse, error)
    55  }
    56  
    57  type client struct {
    58  	cc grpc.ClientConnInterface
    59  }
    60  
    61  func NewAuthorizationServiceClient(cc grpc.ClientConnInterface) AuthorizationServiceClient {
    62  	return &client{cc}
    63  }
    64  
    65  func (c *client) CheckPermissions(ctx context.Context, in *CheckPermissionsRequest, opts ...grpc.CallOption) (*CheckPermissionsResponse, error) {
    66  	out := new(CheckPermissionsResponse)
    67  	err := c.cc.Invoke(ctx, "/ntt.iam.v1alpha2.AuthorizationService/CheckPermissions", in, out, opts...)
    68  	if err != nil {
    69  		return nil, err
    70  	}
    71  	return out, nil
    72  }
    73  
    74  func (c *client) CheckMyPermissions(ctx context.Context, in *CheckMyPermissionsRequest, opts ...grpc.CallOption) (*CheckMyPermissionsResponse, error) {
    75  	out := new(CheckMyPermissionsResponse)
    76  	err := c.cc.Invoke(ctx, "/ntt.iam.v1alpha2.AuthorizationService/CheckMyPermissions", in, out, opts...)
    77  	if err != nil {
    78  		return nil, err
    79  	}
    80  	return out, nil
    81  }
    82  
    83  func (c *client) CheckMyRoles(ctx context.Context, in *CheckMyRolesRequest, opts ...grpc.CallOption) (*CheckMyRolesResponse, error) {
    84  	out := new(CheckMyRolesResponse)
    85  	err := c.cc.Invoke(ctx, "/ntt.iam.v1alpha2.AuthorizationService/CheckMyRoles", in, out, opts...)
    86  	if err != nil {
    87  		return nil, err
    88  	}
    89  	return out, nil
    90  }