Class: Authzed::Api::V1::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/authzed/api/v1/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target:, credentials: nil, interceptors: [], options: {}, timeout: nil) ⇒ Client

Returns a new instance of Client.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/authzed/api/v1/client.rb', line 9

def initialize(target:, credentials: nil, interceptors: [], options: {}, timeout: nil)
  creds = credentials || GRPC::Core::ChannelCredentials.new

  @permissions_service = Authzed::Api::V1::PermissionsService::Stub.new(
    target,
    creds,
    timeout: timeout,
    interceptors: interceptors,
    channel_args: options,
  )
  @schema_service = Authzed::Api::V1::SchemaService::Stub.new(
    target,
    creds,
    timeout: timeout,
    interceptors: interceptors,
    channel_args: options,
  )
  @watch_service = Authzed::Api::V1::WatchService::Stub.new(
    target,
    creds,
    timeout: timeout,
    interceptors: interceptors,
    channel_args: options,
  )
  @experimental_service = Authzed::Api::V1::ExperimentalService::Stub.new(
    target,
    creds,
    timeout: timeout,
    interceptors: interceptors,
    channel_args: options,
  )
end

Instance Attribute Details

#experimental_serviceObject (readonly)

Returns the value of attribute experimental_service.



7
8
9
# File 'lib/authzed/api/v1/client.rb', line 7

def experimental_service
  @experimental_service
end

#permissions_serviceObject (readonly)

Returns the value of attribute permissions_service.



7
8
9
# File 'lib/authzed/api/v1/client.rb', line 7

def permissions_service
  @permissions_service
end

#schema_serviceObject (readonly)

Returns the value of attribute schema_service.



7
8
9
# File 'lib/authzed/api/v1/client.rb', line 7

def schema_service
  @schema_service
end

#watch_serviceObject (readonly)

Returns the value of attribute watch_service.



7
8
9
# File 'lib/authzed/api/v1/client.rb', line 7

def watch_service
  @watch_service
end