proxy

package
v0.0.0-...-d9f233c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Proxy 代理模式:

为其他对象提供一种代理,以控制对这个对象的访问。

个人想法:代理和代理的对象接口一致,客户端不知道代理对象,

而适配器是客户端想要适配器的接口,适配器对象的接口和客户端想要的不一样,
适配器将适配器对象的接口封装一下,改成客户端想要的接口;

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Girl

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

func (*Girl) Name

func (g *Girl) Name() string

func (*Girl) SetName

func (g *Girl) SetName(name string)

type GiveGift

type GiveGift interface {
	// contains filtered or unexported methods
}

type Proxy

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

func NewProxy

func NewProxy(mm Girl) *Proxy

type Pursuit

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL