...

Package fakes2av2

import "github.com/google/s2a-go/internal/v2/fakes2av2"
Overview
Index

Overview ▾

Package fakes2av2 is a fake S2Av2 Go implementation.

type Server

Server is a fake S2A Server for testing.

type Server struct {
    s2av2pb.UnimplementedS2AServiceServer
    // ExpectedToken is the token S2Av2 expects to be attached to the SessionReq.
    ExpectedToken string
    // ShouldNotReturnClientCredentials indicates whether the fake S2Av2 should
    // not return credentials when GetTlsConfiguration is called by a client.
    ShouldNotReturnClientCredentials bool

    ServerAuthorizationPolicy []byte
    // contains filtered or unexported fields
}

func (*Server) SetUpSession

func (s *Server) SetUpSession(stream s2av2pb.S2AService_SetUpSessionServer) error

SetUpSession receives SessionReq, performs request, and returns a SessionResp, all on the server stream.