vault: github.com/hashicorp/vault/helper/forwarding Index | Files

package forwarding

import "github.com/hashicorp/vault/helper/forwarding"

Index

Package Files

types.pb.go util.go

func GenerateForwardedHTTPRequest Uses

func GenerateForwardedHTTPRequest(req *http.Request, addr string) (*http.Request, error)

GenerateForwardedRequest generates a new http.Request that contains the original requests's information in the new request's body.

func ParseForwardedHTTPRequest Uses

func ParseForwardedHTTPRequest(req *http.Request) (*http.Request, error)

ParseForwardedRequest generates a new http.Request that is comprised of the values in the given request's body, assuming it correctly parses into a ForwardedRequest.

func ParseForwardedRequest Uses

func ParseForwardedRequest(fq *Request) (*http.Request, error)

type HeaderEntry Uses

type HeaderEntry struct {
    Values               []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*HeaderEntry) Descriptor Uses

func (*HeaderEntry) Descriptor() ([]byte, []int)

func (*HeaderEntry) GetValues Uses

func (m *HeaderEntry) GetValues() []string

func (*HeaderEntry) ProtoMessage Uses

func (*HeaderEntry) ProtoMessage()

func (*HeaderEntry) Reset Uses

func (m *HeaderEntry) Reset()

func (*HeaderEntry) String Uses

func (m *HeaderEntry) String() string

func (*HeaderEntry) XXX_DiscardUnknown Uses

func (m *HeaderEntry) XXX_DiscardUnknown()

func (*HeaderEntry) XXX_Marshal Uses

func (m *HeaderEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HeaderEntry) XXX_Merge Uses

func (m *HeaderEntry) XXX_Merge(src proto.Message)

func (*HeaderEntry) XXX_Size Uses

func (m *HeaderEntry) XXX_Size() int

func (*HeaderEntry) XXX_Unmarshal Uses

func (m *HeaderEntry) XXX_Unmarshal(b []byte) error

type RPCResponseWriter Uses

type RPCResponseWriter struct {
    // contains filtered or unexported fields
}

func NewRPCResponseWriter Uses

func NewRPCResponseWriter() *RPCResponseWriter

NewRPCResponseWriter returns an initialized RPCResponseWriter

func (*RPCResponseWriter) Body Uses

func (w *RPCResponseWriter) Body() *bytes.Buffer

func (*RPCResponseWriter) Header Uses

func (w *RPCResponseWriter) Header() http.Header

func (*RPCResponseWriter) StatusCode Uses

func (w *RPCResponseWriter) StatusCode() int

func (*RPCResponseWriter) Write Uses

func (w *RPCResponseWriter) Write(buf []byte) (int, error)

func (*RPCResponseWriter) WriteHeader Uses

func (w *RPCResponseWriter) WriteHeader(code int)

type Request Uses

type Request struct {
    // Not used right now but reserving in case it turns out that streaming
    // makes things more economical on the gRPC side
    //uint64 id = 1;
    Method               string                  `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
    Url                  *URL                    `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
    HeaderEntries        map[string]*HeaderEntry `protobuf:"bytes,4,rep,name=header_entries,json=headerEntries,proto3" json:"header_entries,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    Body                 []byte                  `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
    Host                 string                  `protobuf:"bytes,6,opt,name=host,proto3" json:"host,omitempty"`
    RemoteAddr           string                  `protobuf:"bytes,7,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"`
    PeerCertificates     [][]byte                `protobuf:"bytes,8,rep,name=peer_certificates,json=peerCertificates,proto3" json:"peer_certificates,omitempty"`
    XXX_NoUnkeyedLiteral struct{}                `json:"-"`
    XXX_unrecognized     []byte                  `json:"-"`
    XXX_sizecache        int32                   `json:"-"`
}

func GenerateForwardedRequest Uses

func GenerateForwardedRequest(req *http.Request) (*Request, error)

func (*Request) Descriptor Uses

func (*Request) Descriptor() ([]byte, []int)

func (*Request) GetBody Uses

func (m *Request) GetBody() []byte

func (*Request) GetHeaderEntries Uses

func (m *Request) GetHeaderEntries() map[string]*HeaderEntry

func (*Request) GetHost Uses

func (m *Request) GetHost() string

func (*Request) GetMethod Uses

func (m *Request) GetMethod() string

func (*Request) GetPeerCertificates Uses

func (m *Request) GetPeerCertificates() [][]byte

func (*Request) GetRemoteAddr Uses

func (m *Request) GetRemoteAddr() string

func (*Request) GetUrl Uses

func (m *Request) GetUrl() *URL

func (*Request) ProtoMessage Uses

func (*Request) ProtoMessage()

func (*Request) Reset Uses

func (m *Request) Reset()

func (*Request) String Uses

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown Uses

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal Uses

func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Request) XXX_Merge Uses

func (m *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size Uses

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal Uses

func (m *Request) XXX_Unmarshal(b []byte) error

type Response Uses

type Response struct {
    // Not used right now but reserving in case it turns out that streaming
    // makes things more economical on the gRPC side
    //uint64 id = 1;
    StatusCode uint32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
    Body       []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
    // Added in 0.6.2 to ensure that the content-type is set appropriately, as
    // well as any other information
    HeaderEntries        map[string]*HeaderEntry `protobuf:"bytes,4,rep,name=header_entries,json=headerEntries,proto3" json:"header_entries,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    LastRemoteWal        uint64                  `protobuf:"varint,5,opt,name=last_remote_wal,json=lastRemoteWal,proto3" json:"last_remote_wal,omitempty"`
    XXX_NoUnkeyedLiteral struct{}                `json:"-"`
    XXX_unrecognized     []byte                  `json:"-"`
    XXX_sizecache        int32                   `json:"-"`
}

func (*Response) Descriptor Uses

func (*Response) Descriptor() ([]byte, []int)

func (*Response) GetBody Uses

func (m *Response) GetBody() []byte

func (*Response) GetHeaderEntries Uses

func (m *Response) GetHeaderEntries() map[string]*HeaderEntry

func (*Response) GetLastRemoteWal Uses

func (m *Response) GetLastRemoteWal() uint64

func (*Response) GetStatusCode Uses

func (m *Response) GetStatusCode() uint32

func (*Response) ProtoMessage Uses

func (*Response) ProtoMessage()

func (*Response) Reset Uses

func (m *Response) Reset()

func (*Response) String Uses

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown Uses

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal Uses

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge Uses

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size Uses

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal Uses

func (m *Response) XXX_Unmarshal(b []byte) error

type URL Uses

type URL struct {
    Scheme string `protobuf:"bytes,1,opt,name=scheme,proto3" json:"scheme,omitempty"`
    Opaque string `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"`
    // This isn't needed now but might be in the future, so we'll skip the
    // number to keep the ordering in net/url
    //UserInfo user = 3;
    Host    string `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"`
    Path    string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"`
    RawPath string `protobuf:"bytes,6,opt,name=raw_path,json=rawPath,proto3" json:"raw_path,omitempty"`
    // This also isn't needed right now, but we'll reserve the number
    //bool force_query = 7;
    RawQuery             string   `protobuf:"bytes,8,opt,name=raw_query,json=rawQuery,proto3" json:"raw_query,omitempty"`
    Fragment             string   `protobuf:"bytes,9,opt,name=fragment,proto3" json:"fragment,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*URL) Descriptor Uses

func (*URL) Descriptor() ([]byte, []int)

func (*URL) GetFragment Uses

func (m *URL) GetFragment() string

func (*URL) GetHost Uses

func (m *URL) GetHost() string

func (*URL) GetOpaque Uses

func (m *URL) GetOpaque() string

func (*URL) GetPath Uses

func (m *URL) GetPath() string

func (*URL) GetRawPath Uses

func (m *URL) GetRawPath() string

func (*URL) GetRawQuery Uses

func (m *URL) GetRawQuery() string

func (*URL) GetScheme Uses

func (m *URL) GetScheme() string

func (*URL) ProtoMessage Uses

func (*URL) ProtoMessage()

func (*URL) Reset Uses

func (m *URL) Reset()

func (*URL) String Uses

func (m *URL) String() string

func (*URL) XXX_DiscardUnknown Uses

func (m *URL) XXX_DiscardUnknown()

func (*URL) XXX_Marshal Uses

func (m *URL) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*URL) XXX_Merge Uses

func (m *URL) XXX_Merge(src proto.Message)

func (*URL) XXX_Size Uses

func (m *URL) XXX_Size() int

func (*URL) XXX_Unmarshal Uses

func (m *URL) XXX_Unmarshal(b []byte) error

Package forwarding imports 14 packages (graph) and is imported by 7 packages. Updated 2019-04-16. Refresh now. Tools for package owners.