-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from aserto-dev/directory-client-tests
move test files to _test package namespace
- Loading branch information
Showing
9 changed files
with
131 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package directory | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/aserto-dev/go-aserto/client/directory/internal" | ||
) | ||
|
||
func InternalConnect(ctx context.Context, conns *internal.Connections, cfg *Config) (*Client, error) { | ||
return connect(ctx, conns, cfg) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package client | ||
|
||
import ( | ||
"context" | ||
|
||
"google.golang.org/grpc" | ||
) | ||
|
||
func InternalNewConnection(ctx context.Context, | ||
dialContext dialer, | ||
options *ConnectionOptions, | ||
) (*Connection, error) { | ||
return newConnection(ctx, dialContext, options) | ||
} | ||
|
||
func (c *Connection) InternalUnary( | ||
ctx context.Context, | ||
method string, | ||
req, reply interface{}, | ||
cc *grpc.ClientConn, | ||
invoker grpc.UnaryInvoker, | ||
opts ...grpc.CallOption, | ||
) error { | ||
return c.unary(ctx, method, req, reply, cc, invoker, opts...) | ||
} | ||
|
||
func (c *Connection) InternalStream( | ||
ctx context.Context, | ||
desc *grpc.StreamDesc, | ||
cc *grpc.ClientConn, | ||
method string, | ||
streamer grpc.Streamer, | ||
opts ...grpc.CallOption, | ||
) (grpc.ClientStream, error) { | ||
return c.stream(ctx, desc, cc, method, streamer, opts...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package grpc | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api" | ||
) | ||
|
||
func (b *IdentityBuilder) InternalBuild(ctx context.Context, req interface{}) *api.IdentityContext { | ||
return b.build(ctx, req) | ||
} |
Oops, something went wrong.