mirror of
https://github.com/mitchell/selfpass.git
synced 2025-12-14 13:27:21 +00:00
Add aes-cbc encryption; add config repo based on shared_preferences
This commit is contained in:
parent
80f9705b19
commit
67744527cc
15 changed files with 254 additions and 154 deletions
|
|
@ -57,7 +57,10 @@ func (c credentialsClient) GetAllMetadata(ctx context.Context, sourceHost string
|
|||
Errors: errch,
|
||||
})
|
||||
|
||||
srv, err := c.client.GetAllMetadata(ctx, &protobuf.SourceHostRequest{SourceHost: sourceHost})
|
||||
srv, err := c.client.GetAllMetadata(
|
||||
ctx,
|
||||
transport.EncodeSourceHostRequest(endpoints.SourceHostRequest{SourceHost: sourceHost}),
|
||||
)
|
||||
if err != nil {
|
||||
errch <- err
|
||||
return nil, errch
|
||||
|
|
|
|||
|
|
@ -17,11 +17,10 @@ func decodeSourceHostRequest(ctx context.Context, request interface{}) (interfac
|
|||
}, nil
|
||||
}
|
||||
|
||||
func EncodeSourceHostRequest(ctx context.Context, request interface{}) (interface{}, error) {
|
||||
r := request.(endpoints.SourceHostRequest)
|
||||
return protobuf.SourceHostRequest{
|
||||
SourceHost: r.SourceHost,
|
||||
}, nil
|
||||
func EncodeSourceHostRequest(request endpoints.SourceHostRequest) *protobuf.SourceHostRequest {
|
||||
return &protobuf.SourceHostRequest{
|
||||
SourceHost: request.SourceHost,
|
||||
}
|
||||
}
|
||||
|
||||
func encodeMetadataStreamResponse(ctx context.Context, response interface{}) (interface{}, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue