| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| "v.io/x/ref/lib/security" |
| // inMemorySerializer implements SerializerReaderWriter. This Serializer should only |
| type inMemorySerializer struct { |
| var _ security.SerializerReaderWriter = (*inMemorySerializer)(nil) |
| func NewInMemorySerializer() *inMemorySerializer { |
| return &inMemorySerializer{} |
| func (s *inMemorySerializer) Readers() (io.ReadCloser, io.ReadCloser, error) { |
| return &s.data, &s.signature, nil |
| func (s *inMemorySerializer) Writers() (io.WriteCloser, io.WriteCloser, error) { |
| return &s.data, &s.signature, nil |